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

[Bug]: Nextcloud 29 - limit downloads need one for view (e.g. pdfviewer) and one for download #45023

Open
5 of 8 tasks
devnull4242 opened this issue Apr 25, 2024 · 1 comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 29-feedback bug

Comments

@devnull4242
Copy link

devnull4242 commented Apr 25, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

In Nextcloud 29 there is a new nice function "limit downloads". The problem is the fact that with showing the file e.g. PDF the counter is decrease and then the downloads is set from "1" to "0" and then i can not download the file with the download button.

problem with viewer: e.g. PDF
no problem with viewer: Markdown e.g. CSV-file, picture e.g. JPG

I think the pdfviewer uses the download link. Maybe there are other viewers, too.

https://cloud.server.tld/index.php/apps/files_pdfviewer/?file=%2Findex.php%2Fs%2Fiy83XfXHj9PpcbJ%2Fdownload%3Fpath%3D%26files%3D&canDownload=1
[...]
https://cloud.server.tld/index.php/s/iy83XfXHj9PpcbJ/download?path=&files=

Steps to reproduce

  1. install Nextcloud 29
  2. share a file e.g. PDF with "limit downloads" to "1"
  3. open the share
  4. the pdf is viewed, limit goes to "0", no share anymore
  5. the download button on the top does not work

Expected behavior

If i set "download limit" to "1" i expected that a user (e.g. cookie user) can see the file e.g. PDF and also download the file with the download button on the top.

Installation method

Community Web installer on a VPS or web space

Nextcloud Server version

29

Operating system

Other

PHP engine version

PHP 8.2

Web server

Other

Database engine version

SQlite

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

Same problem on two systems, installation on webserver from a hoster.

@devnull4242 devnull4242 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Apr 25, 2024
@devnull4242 devnull4242 changed the title [Bug]: Nextcloud 29 - limit downloads need one for view and one for download [Bug]: Nextcloud 29 - limit downloads need one for view (e.g. pdfviewer) and one for download Apr 25, 2024
@lhsei
Copy link

lhsei commented Apr 25, 2024

We have also problems with the pdfviewer after upgrade to Nextcloud 29.

If a folder/file is shared with other users and the users have only view-rights, the pdf doesn't open. In the log, the following error occurs:

TypeError: Cannot assign null to property OCA\Files_Sharing\Controller\ShareAPIController::$currentUser of type string at /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php#124

Disabling the pdfviewer-app is a workaround - then the pdf-documents where shown in a separate browserwindow.

After more problems with the picture-viewer we have identified, that the config.php-parameter overwrite_webroot has triggered the errors.
We don't have changed the parameter for a long time, everything works as expected until Nextcloud 29. Now we have commented out the parameter in our config.php and everything works.

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 29-feedback bug
Projects
None yet
Development

No branches or pull requests

3 participants