Skip to content

[Bug]: Public share link fails with "Strict Cookie has not been found in request" and 412 Precondition Failed when clicking, but works when copy-pasting #52482

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

Open
4 of 8 tasks
TomKamin1 opened this issue Apr 26, 2025 · 0 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 31-feedback bug

Comments

@TomKamin1
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

Hi,
I'm running a Nextcloud instance and encountering a strange behavior when using public share links.

When I click on a share link (e.g., from an email or messenger), I get an error:
{"error":"Strict Cookie has not been found in request"}

Additionally, the browser console shows a failed request:

GET https://cloud.mydomain.eu/public.php/dav/files/<file_id>/?accept=zip  
412 (Precondition Failed)

However, if I copy and paste the same URL manually into the browser's address bar, everything works fine — no errors.

It looks like the problem is a combination of:

  • Cookies not being sent due to SameSite policies (Strict or Lax).
  • WebDAV requests (like /public.php/dav/) failing when session/auth cookies are missing.

overwrite.cli.url and overwriteprotocol are properly set in config.php.

Steps to reproduce

  1. Share a file/folder via public link.
  2. Send the link via email or chat.
  3. Click the link (don't paste manually).
  4. Observe the cookie error and 412 precondition failure.

Expected behavior

Public shares should work reliably when clicked without requiring users to manually paste links.

Notes:

This appears to be a cookie/session handling issue, combined with WebDAV precondition checks.

Browser: [browser + version]

No major proxy misconfiguration detected.

Nextcloud Server version

31

Operating system

Debian/Ubuntu

PHP engine version

None

Web server

None

Database engine version

MariaDB

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

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

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

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

@TomKamin1 TomKamin1 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Apr 26, 2025
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 31-feedback bug
Projects
None yet
Development

No branches or pull requests

2 participants