-
Notifications
You must be signed in to change notification settings - Fork 42
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 viewer does not open in a public link share #286
Comments
Can you provide a link for me to test? |
Maybe it is this problem? |
I can confirm the issue, it seems to work with a nextcloud 20.0.5 Instance but a 20.0.6 and a 20.0.7 Instance shows me a error if I open Not Working Link: Working Link: Shared folder contains a PDF (Nextcloud 20.0.5): https://home.gonline.at:4443/s/BEp93ifzebQ7Frj? |
Can confirm, since update to 20.0.6 and 20.0.7 shared folders with PDF dont work. |
I can confirm this, too. When logged in, I can open PDF files perfectly fine. Opening the same folder as a shared link (not logged in to nextcloud), the following error occurs: PDF.js v2.4.456 (build: 228a591c) I've updated from 20.0.4 to 20.0.7 today. |
+1 On my side Latest NC 20.0.7 The only workaround is to disable PDF Viewer |
same problem here, since update to 20.0.7 |
+1 |
Same here after Upgrade to 20.0.7. Nextclouds log says: "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." But resharing the file again does not change anything. |
+1 |
This is the same bug than here : #207 |
@nderambure Not exactly as described in #207. I experience this issue only when opening a PDF file from a shared folder. Links made directly to the same PDF open fine. Also it was working up to v20.0.5 and now in 20.0.7 it does not. That does not mean it is not the same bug, I just can't say it is based on the description in #207. |
It's just an attempt to "wake up" this bug for centralizing effort ;) |
I'm pretty sure that this issue was introduced in commit c992b55. The new This URL:
Splits into the following chunks:
Each chunk is
Result: https://nextcloud.example.com/index.php/ohxie9ba1ii5AeS/download%3Fpath%3D/%26files%3DTest.pdf This path does not exist in the server and the server issues a 302 redirect to the login page. |
cc @danxuliu |
In nextcloud#286, users have reported that PDF files are not viewable via public share links. The issue was introduced in c992b55 when attempting to encode parts of the URL for files that have special characters. This patch uses the URL Web API to deal with the parts of the URL in a more specific way. Also, the path and files searchParams are set based on `this.filename` and `this.basename` in the same way it is done in the View module when setting `davPath`. This has been tested on private and shared public links on files with and without special characters.
In nextcloud#286, users have reported that PDF files are not viewable via public share links. The issue was introduced in c992b55 when attempting to encode parts of the URL for files that have special characters. This patch uses the URL Web API to deal with the parts of the URL in a more specific way. Also, the path and files searchParams are set based on `this.filename` and `this.basename` in the same way it is done in the View module when setting `davPath`. This has been tested on private and shared public links on files with and without special characters.
Thanks, we also affected by this issue. |
Same issue here. Without knowing how to patch with #309, I circumvented temporarily the problem by disabling the PDFViewer in the list of apps. At least users do not complain anymore! |
behaviour seems to match this old bug nextcloud/server#19572 |
The newest release of NC 21 has this fixed for me.
|
@skjnldsv Can you reopen the issue? |
see #381 (comment) |
Oh, I see. The fix didn't make it in 21.0.2. The manual patch works fine. Thank you for your support 🙏 |
This issue still seems to exist (or has been brought back by a regression) in Nextcloud 28.0.4. Sharing a link to a PDF (set to editable) won't even show the PDF to someone not logged in. If logged in it shows fine. If special characters are removed from the file name (in this case hyphens), it works fine. Special characters don't seem to matter in preceding folders. Do we need to reopen this, or is this considered a new issue? The symptoms certainly seem to still be the same. |
I already created a new issue in #946 |
Steps to reproduce
Expected behaviour
Pdf viewer should open
Actual behaviour
Only see the download page
Server configuration detail
Operating system: Linux 5.4.41-1-pve #1 SMP PVE 5.4.41-1 (Fri, 15 May 2020 15:06:08 +0200) x86_64
Webserver: Apache/2.4.25 (Debian) (apache2handler)
Database: mysql 10.1.47
PHP version:
7.3.25-1+0
20201130.73+debian91.gbp042074Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, apache2handler, mysqlnd, PDO, xml, apcu, bcmath, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, intl, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache
Nextcloud version: 20.0.5 - 20.0.5.2
Updated from an older Nextcloud/ownCloud or fresh install:
Where did you install Nextcloud from: unknown
Signing status
Array
(
)
List of activated apps
Configuration (config/config.php)
Are you using external storage, if yes which one: local/smb/sftp/...
Are you using encryption:
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
Client configuration
Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0
Operating system:
Logs
Web server error log
Nextcloud log
Browser log
Insert your browser log here, this could for example include:
The text was updated successfully, but these errors were encountered: