Skip to content

Match the owner of quote and feature requests in any spelling - #3900

Closed
pfefferle wants to merge 2 commits into
trunkfrom
fix/instrument-owner-compare
Closed

pfefferle wants to merge 2 commits into
trunkfrom
fix/instrument-owner-compare

Conversation

@pfefferle

Copy link
Copy Markdown
Member

Proposed changes:

  • Quote and feature requests are approved when the fetched post or collection is attributed to the requesting actor (Only approve quote requests for the requester's own post #3881, Only approve feature requests for the requester's own collection #3891). The attributedTo check compared the exact string, and for a list only the first entry.
  • Both sides are now compared with normalize_actor_uri(), like actor blocks do, so host case, a default port, a trailing slash or a fragment no longer turn the owner into a Reject.
  • attributedTo can be a list (several authors), with strings or objects. The request is approved if the actor is one of them.
  • The id check stays strict. queue_accept() stores the instrument as the request spells it, so a slash variant would leave a stamp that the revocation does not find (see the own post with slash test).

Other information:

  • Have you written new tests for your changes, if applicable?

Mastodon sends the same string in both places, so for Mastodon nothing changes. This is for other servers.

Testing instructions:

  • Run vendor/bin/phpunit --filter 'Test_Feature_Request|Test_Quote_Request'.
  • The rows "owner spelled differently", "one of several owners", "author spelled differently" and "one of several authors" fail on trunk with a Reject and pass here.

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Added - for new features
  • Changed - for changes in existing functionality
  • Deprecated - for soon-to-be removed features
  • Removed - for now removed features
  • Fixed - for any bug fixes
  • Security - in case of vulnerabilities

Message

Quote and feature requests are now approved when the remote post or collection lists several authors, or writes the author's address in a different form.

@pfefferle pfefferle added the Bug Something isn't working label Oct 16, 2026
@pfefferle pfefferle self-assigned this Oct 16, 2026
@pfefferle
pfefferle requested a review from a team October 16, 2026 16:23
@pfefferle
pfefferle marked this pull request as draft October 16, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant