Skip to content

[stable35] fix(dav): bind public share session authentication to the password hash - #66204

Merged
susnux merged 3 commits into
stable35from
backport/66178/stable35
Nov 3, 2026
Merged

susnux merged 3 commits into
stable35from
backport/66178/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Backport of #66178

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

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>
PublicAuth on this branch resolves the share token from getPathInfo().

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnux force-pushed the backport/66178/stable35 branch from a0116ff to be85da7 Compare November 3, 2026 14:20
@susnux
susnux marked this pull request as ready for review November 3, 2026 14:20
@susnux
susnux requested review from a team as code owners November 3, 2026 14:20
@susnux
susnux requested review from Altahrim, salmart-dev and sorbaugh and removed request for a team November 3, 2026 14:20
@susnux
susnux merged commit 6fcd9ac into stable35 Nov 3, 2026
151 of 156 checks passed
@susnux
susnux deleted the backport/66178/stable35 branch November 3, 2026 18:41
@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.

2 participants