Conversation
mvanhorn
requested review from
Altahrim,
come-nc,
icewind1991 and
leftybournes
and removed request for
a team
September 20, 2026 05:38
icewind1991
approved these changes
Sep 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add token persistence to the existing parameterized update query in apps/sharebymail/lib/ShareByMailProvider.php, using the supplied share's getToken() alongside the other persisted fields. Apply this consistently to email-backed shares: the existing API already accepts custom tokens for both TYPE_LINK and TYPE_EMAIL, and the thread's suggestion that email token immutability is intentional is a participant's hypothesis rather than a documented restriction in the inspected code. Extend the existing database-backed ShareByMailProviderTest::testUpdate coverage, explicitly providing the original or replacement token on share fixtures and checking the stored value; add a file-request-shaped case with a folder, CREATE permission, empty recipient, and file-request attributes.
Customizing a File Request token returns apparent success and changes the displayed link, but the persisted share retains its previous token. The reporter reproduced this on Nextcloud 33, and another participant confirmed it on version 34 and a beta. File requests created with mail sharing enabled use TYPE_EMAIL even without a recipient, so their updates reach ShareByMailProvider rather than the link-share provider. The API sets the requested token on the share object, but ShareByMailProvider::update() returns that object without writing its token to the database.
TODO
Checklist
Not verified: this needs a person on the named hardware or environment.
3. to review, feature component)Not run: no test command resolved in this workspace, so nothing was executed to pass.
stable32)Not run: no test command resolved in this workspace, so nothing was executed to pass.
AI (if applicable)
AI was used for assistance.