Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share and login bookmarks broken after update to 14.03 #11845

Closed
wiertz opened this issue Oct 15, 2018 · 5 comments
Closed

Share and login bookmarks broken after update to 14.03 #11845

wiertz opened this issue Oct 15, 2018 · 5 comments
Labels

Comments

@wiertz
Copy link

wiertz commented Oct 15, 2018

Steps to reproduce

  1. Upgrade from 14.02 to 14.03
  2. Try accessing Nextcloud login page from bookmark or existing URL share

Expected behaviour

Login page or shared file/folder should show

Actual behaviour

Page not found

Server configuration

Operating system: Ubuntu 16.04 LTS

Web server: Apache

Database: MariaDB

PHP version: 7

Nextcloud version: (see Nextcloud admin page) 14.03

Updated from an older Nextcloud/ownCloud or fresh install: 14.02 -> 14.03

Where did you install Nextcloud from: Updater

It appears that relative paths have changed: the bookmark stored links to "https://my.server.de/login", now it is "https://my.server.de/index.php/login". Same for shares: "https://my.server.de/s/2kLWXc9QkXtDGFX" is now broken, "https://my.server.de/index.php/s/2kLWXc9QkXtDGFX" works.

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #6277 (Broken instance after Update), #3918 (share dialog broken), #11637 (No upload to shared folder possible after update to 14.0.1 (S3 primary storage)), #5909 (Update broken on PGSQL), and #3001 (Bug after Update from NC10 to NC11: Sharing with users breaks ).

@violoncelloCH
Copy link
Member

The pretty url "feature" (which enables index.php-less urls) is normally automatically activated in nextcloud (through .htaccess), so something must have changed not allowing pretty urls anymore, so your links don't work now.
can you check if apache mod_rewrite is enabled?

@wiertz
Copy link
Author

wiertz commented Oct 18, 2018

mod_rewrite is enabled.

What I noticed is that 14.02 reminded me that Referrer-Policy" HTTP header is not set to "no-referrer", "no-referrer-when-downgrade", "strict-origin" or "strict-origin-when-cross-origin". I modified the .htaccess file and the warning was gone, but after upgrading to 14.03 it reappeared. It thus seems as if the .htaccess file was modified or overwritten during the update process?

My knowledge of apache is pretty basic, but looking through the current .htaccess file I noticed that there is only one section containing rewrite rules and in there all but the last rewrite rule appear to be conditional on a DAV client and none of them seem relevant to my issue. The relevant section of the file is below. What should the correct rewrite rule for enabling pretty urls look like?

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{HTTP_USER_AGENT}  DavClnt
  RewriteRule ^$         /remote.php/webdav/          [L,R=302]
  RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L]
  RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json $
  RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
  RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
  RewriteRule ^remote/(.*) remote.php [QSA,L]
  RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
  RewriteCond %{REQUEST_URI} !^/\.well-known/(acme-challenge|pki-validation)/.*
  RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
</IfModule>

@violoncelloCH
Copy link
Member

It's normal, that nextcloud overwrites the .htaccess on updates... you could try to let it regenerate the .htaccess with occ maintenance:update:htaccess

@wiertz
Copy link
Author

wiertz commented Oct 19, 2018

I did, which gave me this error: Error updating .htaccess file, not enough permissions or "overwrite.cli.url" set to an invalid URL?. This came up in #10678 and adding a trailing slash to my overwrite cli url in the config fixed the issue. Thanks for your help!

@wiertz wiertz closed this as completed Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants