Skip to content

fix(dav): bind public share session authentication to the password hash - #66178

Merged
susnux merged 2 commits into
masterfrom
fix/dav-public-share-session
Nov 3, 2026
Merged

susnux merged 2 commits into
masterfrom
fix/dav-public-share-session

Conversation

@susnux

@susnux susnux commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The public DAV backends and the federated "add to your Nextcloud" endpoint remembered a verified share password as a bare share id in the session. Validate against the share token => password hash map that the public share page already uses instead, so the session entry only matches while the share password is unchanged.

The legacy public_link_authenticated id list is still written by the share page for other apps, but no longer read by server.
👁️ I look at you text app 👁️

Checklist

AI (if applicable)

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

@susnux susnux added bug 3. to review Waiting for reviews labels Nov 3, 2026
@susnux susnux added this to the Nextcloud 36 milestone Nov 3, 2026
@susnux

susnux commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable35

@susnux

susnux commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@susnux

susnux commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable33

@susnux
susnux marked this pull request as ready for review November 3, 2026 12:29
@susnux
susnux requested review from a team as code owners November 3, 2026 12:29
@susnux
susnux requested a review from provokateurin November 3, 2026 12:51
The public DAV backends and the federated "add to your Nextcloud" endpoint
remembered a verified share password as a bare share id in the session.
Validate against the share token => password hash map that the public share
page already uses instead, so the session entry only matches while the share
password is unchanged.

The legacy `public_link_authenticated` id list is still written by the share
page for other apps, but no longer read by server.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Skip remembering the share in the session unless its password is hashed,
and compare the stored hash with hash_equals().

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnux force-pushed the fix/dav-public-share-session branch from 453c92e to 745bd1d Compare November 3, 2026 12:52
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically locked because it has been closed for more than 7 days. As we do not monitor merged or closed pull requests, we are locking this pull request to prevent further comments from getting lost in the noise.
If you discovered any issues with this pull request, please open a new issue instead. In case you want to discuss this pull request or have further questions, please use our forum: https://help.nextcloud.com

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants