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

PDF.js cannot open file with space (%20) in URL #27116

Closed
s4g1n0 opened this issue May 26, 2021 · 1 comment
Closed

PDF.js cannot open file with space (%20) in URL #27116

s4g1n0 opened this issue May 26, 2021 · 1 comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@s4g1n0
Copy link

s4g1n0 commented May 26, 2021

This looks like some error in escaping of URL containing "%20", as this is escaped into "%2520" and then file is not found.
Original directory URL: https://example.com/index.php/apps/files/?dir=/abcd/test/Documents/Testing%20Directory&fileid=1852584
Broken PDF file url: https://example.com/remote.php/dav/files/abcd/test/Documents/Testing%2520Directory/202105.pdf

Steps to reproduce

  1. Open whatever directory with space in name
  2. Try to open pdf in that directory

Expected behaviour

PDF will be loaded inside PDF.js in browser

Actual behaviour

PDF.js loads with error message:
PDF.js v2.5.207 (build: 0974d6052)
Message: Missing PDF "https://example.com/remote.php/dav/files/abcd/test/Documents/Testing%2520Directory/202105.pdf".

Server configuration

Operating system: Debian stable 10.9

Web server: apache2 2.4.38-3+deb10u4

Database: mariadb-server 1:10.3.27-0+deb10u1

PHP version: libapache2-mod-php 2:7.3+69

Nextcloud version: 21.0.2

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

Where did you install Nextcloud from:

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 - bruteforcesettings: 2.1.0 - calendar: 2.2.1 - cloud_federation_api: 1.4.0 - comments: 1.11.0 - contacts: 3.5.1 - contactsinteraction: 1.2.0 - dav: 1.17.1 - external: 3.8.1 - federatedfilesharing: 1.11.0 - federation: 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 - firstrunwizard: 2.10.0 - keeweb: 0.6.5 - logreader: 2.6.0 - lookup_server_connector: 1.9.0 - nextcloud_announcements: 1.10.0 - notifications: 2.9.0 - oauth2: 1.9.0 - occweb: 0.0.7 - password_policy: 1.11.0 - photos: 1.3.0 - privacy: 1.5.0 - provisioning_api: 1.11.0 - ransomware_protection: 1.10.1 - recommendations: 1.0.0 - richdocuments: 4.1.1 - richdocumentscode: 6.4.806 - serverinfo: 1.11.0 - settings: 1.3.0 - sharebymail: 1.11.0 - spreed: 11.2.1 - support: 1.4.0 - survey_client: 1.9.0 - systemtags: 1.11.0 - text: 3.2.0 - theming: 1.12.0 - twofactor_backupcodes: 1.10.0 - updatenotification: 1.11.0 - user_ldap: 1.11.0 - user_status: 1.1.1 - viewer: 1.5.0 - weather_status: 1.1.0 - workflowengine: 2.3.0Disabled: - admin_audit - dashboard - encryption

Nextcloud configuration:

Config report { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "example.com" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "21.0.2.1", "overwrite.cli.url": "https:\/\/emaple.com", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "filelocking.enabled": true, "memcache.locking": "\\OC\\Memcache\\Redis", "memcache.local": "\\OC\\Memcache\\APCu", "memcache.distributed": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "dbindex": 0, "password": "***REMOVED SENSITIVE VALUE***", "timeout": 1.5 }, "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "smtp", "mail_sendmailmode": "smtp", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtpsecure": "tls", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "maintenance": false, "theme": "", "loglevel": 2, "app_install_overwrite": [ "occweb" ], "ldapIgnoreNamingRules": false, "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory", "default_phone_region": "SK" }}

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: LDAP

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: Opera, Firefox

Operating system: Windows 10, Debian testing

Logs

Web server error log

Web server error log
Insert your webserver log here

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) ...
@s4g1n0 s4g1n0 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels May 26, 2021
@kesselb
Copy link
Contributor

kesselb commented May 26, 2021

@kesselb kesselb closed this as completed May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

2 participants