Skip to content

fix(share): check the share password hash for authenticated public shares - #9634

Open
juliusknorr wants to merge 1 commit into
mainfrom
fix/public-share-session-hash
Open

juliusknorr wants to merge 1 commit into
mainfrom
fix/public-share-session-hash

Conversation

@juliusknorr

@juliusknorr juliusknorr commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

📝 Summary

Use the server's PublicAuth::isShareInSession() to check public share sessions, so access follows the current share password. Older server releases without the helper keep the existing share id check.

  • One helper FileService::isShareAuthenticated(), used by FileService, WorkspaceController and AttachmentController::getAuth()
  • Attachment endpoints check it in getAuth(), so the duplicate check in AttachmentService is gone
  • Guarded with is_callable, so servers without the public static helper fall back without errors

🏁 Checklist

  • Code is properly formatted (composer run cs:check)
  • Sign-off message is added to all commits
  • Tests: unit tests for FileService, WorkspaceController and AttachmentController, for both server variants
  • Documentation is not required

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Nov 18, 2026
@juliusknorr
juliusknorr marked this pull request as ready for review November 18, 2026 21:41
…ares

Use PublicAuth::isShareInSession() from the server when available, so access follows the current share password. Older server releases without the helper keep using the list of authenticated share ids.

Signed-off-by: Julius Knorr <jus@bitgrid.net>
Assisted-by: ClaudeCode:claude-opus-5-5
@juliusknorr
juliusknorr force-pushed the fix/public-share-session-hash branch from 1d22b63 to 6003dad Compare November 18, 2026 21:44
@juliusknorr

Copy link
Copy Markdown
Member Author

/backport to stable35

@juliusknorr

Copy link
Copy Markdown
Member Author

/backport to stable34

@juliusknorr

Copy link
Copy Markdown
Member 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

Labels

3. to review AI assisted This PR contains AI-assisted commits backport-request bug Something isn't working feature: sharing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants