Skip to content

fix(dav): return 404 instead of 503 for unknown public share tokens - #66019

Open
susnux wants to merge 1 commit into
masterfrom
fix/dav/public-auth-not-found
Open

susnux wants to merge 1 commit into
masterfrom
fix/dav/public-auth-not-found

Conversation

@susnux

@susnux susnux commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

PublicAuth::check() converted every unexpected exception into a ServiceUnavailable, including the NotFound thrown for a share token that does not exist (anymore), e.g. after the share was deleted by reaching its download limit.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

PublicAuth::check() converted every unexpected exception into a
ServiceUnavailable, including the NotFound thrown for a share token
that does not exist (anymore), e.g. after the share was deleted by
reaching its download limit. Clients got a 503 and every such request
was logged as an error.

Let NotFound pass through and also map the ShareNotFound from the
strict cookie check to a NotFound, registering a brute force attempt
like checkToken() does.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnux requested a review from a team as a code owner October 29, 2026 17:39
@susnux
susnux requested review from Altahrim, GhassenKefi, leftybournes, provokateurin, salmart-dev and sorbaugh and removed request for a team, salmart-dev and sorbaugh October 29, 2026 17:39
@susnux susnux added bug 3. to review Waiting for reviews labels Oct 29, 2026
@susnux susnux added this to the Nextcloud 36 milestone Oct 29, 2026
@susnux

susnux commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable35

@susnux

susnux commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@susnux

susnux commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable33

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When the limit is reached the download request crashes with 503 Service Unavailable

2 participants