nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.13k stars 3.94k forks source link

Inline viewer says file not found #27477

Closed jkroepke closed 3 years ago

jkroepke commented 3 years ago

How to use GitHub

Steps to reproduce

  1. Create a folder like V+V
  2. Uploaded a pdf file
  3. open a PDF file

Expected behaviour

The PDF file should be visible inside browser

Actual behaviour

The PDF viewer says "PDF file not found"

Opens the browser console, nextcloud is calling the URL

/remote.php/dav/files/jan/V%252BV/ZEG02022021.pdf

It looks like V%252BV is urlencode twice.

> decodeURIComponent(decodeURIComponent("%252B"))
"+"

All files outside this folder works fine.

Server configuration

Operating system: Ubuntu 20.04

Web server: nginx

Database: mysql

PHP version: 7.4.3

Nextcloud version: (see Nextcloud admin page) nextcloud 21.0.2

Updated from an older Nextcloud/ownCloud or fresh install: old version

Where did you install Nextcloud from: tar file, then using the nextcloud updater

Signing status:

Signing status ``` No errors have been found. ```

List of activated apps:

App list ``` Enabled: - accessibility: 1.7.0 - activity: 2.14.3 - audioplayer: 3.1.0 - cloud_federation_api: 1.4.0 - dav: 1.17.1 - federatedfilesharing: 1.11.0 - files: 1.16.0 - files_external: 1.12.0 - files_pdfviewer: 2.1.0 - files_rightclick: 1.0.0 - files_sharing: 1.13.1 - files_trashbin: 1.11.0 - files_versions: 1.14.0 - files_videoplayer: 1.10.0 - groupfolders: 9.0.1 - guests: 2.0.0 - logreader: 2.6.0 - lookup_server_connector: 1.9.0 - notifications: 2.9.0 - oauth2: 1.9.0 - photos: 1.3.0 - previewgenerator: 3.1.1 - provisioning_api: 1.11.0 - settings: 1.3.0 - sharebymail: 1.11.0 - theming: 1.12.0 - twofactor_backupcodes: 1.10.0 - updatenotification: 1.11.0 - viewer: 1.5.0 - workflowengine: 2.3.0 Disabled: - admin_audit - bruteforcesettings - comments - contactsinteraction - dashboard - encryption - federation - firstrunwizard - nextcloud_announcements - password_policy - privacy - recommendations - serverinfo - support - survey_client - systemtags - text - user_ldap - user_status - weather_status ```

Nextcloud configuration:

Config report ``` { "system": { "version": "21.0.2.1", "knowledgebaseenabled": false, "allow_user_to_change_display_name": false, "trusted_domains": [ "owncloud.atu-clan.de", "owncloud.privneustadt.de", "owncloud.creativesandbox.de", "nc.jkroepke.de" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbname": "***REMOVED SENSITIVE VALUE***", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "installed": true, "default_language": "de", "defaultapp": "files", "enable_avatars": false, "skeletondirectory": "", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpdebug": false, "mail_smtpmode": "smtp", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "mail_smtptimeout": 10, "proxy": "proxy:3128", "config_is_read_only": false, "logdateformat": "F d, Y H:i:s", "logtimezone": "Europe\/Berlin", "loglevel": 0, "log_rotate_size": 1048576, "blacklisted_files": [ ".htaccess" ], "share_folder": "\/", "filesystem_check_changes": 0, "trashbin_retention_obligation": "30, 60", "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "forwarded_for_headers": [ "HTTP_X_FORWARDED", "HTTP_FORWARDED_FOR" ], "filelocking.enabled": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "theme": "", "maintenance": false, "secret": "***REMOVED SENSITIVE VALUE***", "updatechecker": true, "memcache.local": "\\OC\\Memcache\\APCu", "memcache.locking": "\\OC\\Memcache\\APCu", "htaccess.RewriteBase": "\/", "updater.release.channel": "stable", "overwrite.cli.url": "https:\/\/owncloud.atu-clan.de", "upgrade.disable-web": false, "mysql.utf8mb4": true, "app_install_overwrite": [ "quota_warning", "keeweb", "files_external_gdrive" ], "enabledPreviewProviders": [ "OC\\Preview\\PNG", "OC\\Preview\\JPEG", "OC\\Preview\\GIF", "OC\\Preview\\HEIC", "OC\\Preview\\BMP", "OC\\Preview\\XBitmap", "OC\\Preview\\MP3", "OC\\Preview\\TXT", "OC\\Preview\\MarkDown", "OC\\Preview\\MSOffice2003", "OC\\Preview\\MSOffice2007", "OC\\Preview\\MSOfficeDoc", "OC\\Preview\\OpenDocument", "OC\\Preview\\PDF", "OC\\Preview\\Photoshop", "OC\\Preview\\Postscript", "OC\\Preview\\SVG", "OC\\Preview\\TIFF" ], "default_phone_region": "DE" } } ```

Are you using external storage, if yes which one: smb

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

LDAP configuration (delete this part if not used)

LDAP config ``` With access to your command line run e.g.: sudo -u www-data php occ ldap:show-config from within your Nextcloud installation folder Without access to your command line download the data/owncloud.db to your local computer or access your SQL server remotely and run the select query: SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap'; Eventually replace sensitive data as the name/IP-address of your LDAP server or groups. ```

Client configuration

Browser: Chrome

Operating system: MacOS

Logs

Web server error log

Web server error log ``` host IP - - [11/Jun/2021:19:15:22 +0200] "GET /remote.php/dav/files/jan/V%252BV/ZEG02022021.pdf HTTP/1.1" 404 31 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36" ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` Insert your Nextcloud log here ```

Browser log

Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
solracsf commented 3 years ago

Duplicate of https://github.com/nextcloud/files_pdfviewer/issues/381