Cannot set password for shared links

Server configuration

Operating system: Ubuntu 18.04 LTS
Web server: Apache 2.4.29
Database: MySQL 5.7.26
PHP version: PHP 7.2.19
Nextcloud version: 16.0.1

Expected behaviour

  • (With “enforce password protection” enabled for shared links) A link is provided after choosing a password for a shared link.
  • (With “enforce password protection” disabled for shared links) A link can be password protected.

Actual behaviour

Nothing happens once a password is entered.

Is this the first time you’ve seen this error?

Yes but never tried this before.

Steps to reproduce

  • (With “enforce password protection” enabled for shared links) Navigate to a gallery/folder -> click share button -> tick “Share link” -> type a password and press Enter -> a loading icon appears briefly, then the password box blanks out and nothing happens.
  • (With “enforce password protection” disabled for shared links) Navigate to a gallery/folder -> click share button -> tick “Share link” -> tick “Password protect” -> type a password and press Enter -> a loading icon appears briefly, then the password box blanks out -> copy the link URL -> paste it in a private browsing window -> can access it without a password.

Details

I discovered this after trying to share a folder for the first time. I had “enforce password protection” enabled for shared links in my admin settings, so when I try to share a link the first thing it asks is to type a password. I cannot get past this stage. It doesn’t matter what I type, it just briefly shows a loading icon then just removes what I’ve typed:

I tried disabling “enforce password protection” and now I can actually share links, but I cannot choose a password. There’s no real indication that the password I try to apply doesn’t take effect, which is a bit of a security issue also. Trying the share links in a private browser shows no password is asked.

Extra Info

  • This was happening with the previous version too (15.x).
  • Nothing is printed to the logs, despite having debug logging enabled in the settings.
  • Nothing relevant seems to be printed to the PHP or Apache logs either.
  • This happens in both Firefox and vanilla Chromium.

Logs

The output of your Nextcloud log in Admin > Logging:

There is literally nothing in it since my last update.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'xxx',
    1 => '192.168.1.89',
  ),
  'datadirectory' => '/data/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '16.0.1.1',
  'overwrite.cli.url' => 'https://xxx/nextcloud',
  'dbname' => 'xxx',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'xxx',
  'mail_domain' => 'xxx',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'xxx',
  'mail_smtpport' => 'xxx',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xxx',
  'mail_smtppassword' => 'xxx',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'mail_sendmailmode' => 'smtp',
  'updater.secret' => 'xxx',
);

The output of your Apache/nginx/system log in /var/log/____:

192.168.1.101 - - [11/Jun/2019:19:44:50 +0100] "GET /nextcloud/index.php/apps/gallery/ HTTP/1.1" 200 6718 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:51 +0100] "GET /nextcloud/index.php/apps/accessibility/js/accessibility?v=0 HTTP/1.1" 200 1126 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:51 +0100] "GET /nextcloud/index.php/avatar/xxx/32?v=1 HTTP/1.1" 201 1770 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:51 +0100] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 2218 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:51 +0100] "GET /nextcloud/cron.php HTTP/1.1" 200 998 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:51 +0100] "GET /nextcloud/index.php/apps/gallery/config? HTTP/1.1" 200 1273 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:51 +0100] "GET /nextcloud/index.php/apps/theming/icon/gallery?v=7 HTTP/1.1" 200 8432 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:51 +0100] "GET /nextcloud/index.php/apps/theming/favicon/gallery?v=7 HTTP/1.1" 200 91335 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:51 +0100] "GET /nextcloud/index.php/apps/gallery/slideshow HTTP/1.1" 200 1586 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:51 +0100] "GET /nextcloud/index.php/apps/gallery/files/list?location=&mediatypes=image%2Fpng%3Bimage%2Fjpeg%3Bimage%2Fgif%3Bimage%2Fx-xbitmap%3Bimage%2Fbmp&features=&etag HTTP/1.1" 200 9616 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:52 +0100] "GET /nextcloud/index.php/apps/gallery/files/list?location=Photos&mediatypes=image%2Fpng%3Bimage%2Fjpeg%3Bimage%2Fgif%3Bimage%2Fx-xbitmap%3Bimage%2Fbmp&features=&etag HTTP/1.1" 200 1540 "-"
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:52 +0100] "GET /nextcloud/index.php/apps/gallery/preview/9210?width=400&height=200 HTTP/1.1" 200 37373 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:53 +0100] "GET /nextcloud/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=Photos&shared_with_me=true HTTP/1.1" 200 939 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:53 +0100] "GET /nextcloud/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=Photos&reshares=true HTTP/1.1" 200 782 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:56 +0100] "GET /nextcloud/core/fonts/Nunito-Regular-latin-ext.woff2 HTTP/1.1" 200 19133 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.101 - - [11/Jun/2019:19:44:57 +0100] "PUT /nextcloud/ocs/v2.php/apps/files_sharing/api/v1/shares/undefined?format=json HTTP/1.1" 404 985 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"