Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If HTTP signature is wrong and webfinger cache is stale, retry with resolve #5129

Merged
merged 1 commit into from
Sep 28, 2017

Conversation

Gargron
Copy link
Member

@Gargron Gargron commented Sep 28, 2017

If the signature could not be verified and the webfinger of the account was last retrieved longer than the cache period, try re-resolving the account and then attempting to verify the signature again

…esolve

If the signature could not be verified and the webfinger of the account
was last retrieved longer than the cache period, try re-resolving the
account and then attempting to verify the signature again
@Gargron Gargron added activitypub Protocol-related changes, federation bug Something isn't working labels Sep 28, 2017
Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it doesn't look wrong to me, I fail to see what it solves. Indeed, account_from_key_id already updates remote data (provided old enough last_webfingered_at) by calling ResolveRemoteAccount.

On a side note, I have noticed the following files include SignatureVerification without seemingly using it:

  • app/controllers/accounts_controller.rb
  • app/controllers/stream_entries_controller.rb

@Gargron
Copy link
Member Author

Gargron commented Sep 28, 2017

@ThibG Uh no, account_from_key_id only calls ResolveRemoteAccountService for OStatus keyId format which is not used by Mastodon anymore.

@ClearlyClaire
Copy link
Contributor

@Gargron ah, right, and the ActivityPub codepath indeed tries to get the local account info first… hm I think I'd prefer calling ResolveRemoteAccountService unconditionally (see #5048), but I'm fine with your proposed change, then!

@Gargron Gargron merged commit 76f360c into master Sep 28, 2017
@Gargron Gargron deleted the fix-never-refreshing-stale-activitypub-accounts branch September 28, 2017 15:50
rutan pushed a commit to rutan/mastodon that referenced this pull request Oct 11, 2017
…esolve (mastodon#5129)

If the signature could not be verified and the webfinger of the account
was last retrieved longer than the cache period, try re-resolving the
account and then attempting to verify the signature again
cobodo pushed a commit to cobodo/mastodon that referenced this pull request Oct 20, 2017
…esolve (mastodon#5129)

If the signature could not be verified and the webfinger of the account
was last retrieved longer than the cache period, try re-resolving the
account and then attempting to verify the signature again
abcang pushed a commit to pixiv/mastodon that referenced this pull request Oct 12, 2018
…esolve (mastodon#5129)

If the signature could not be verified and the webfinger of the account
was last retrieved longer than the cache period, try re-resolving the
account and then attempting to verify the signature again
KScl pushed a commit to KScl/mastodon that referenced this pull request Dec 4, 2019
…esolve (mastodon#5129)

If the signature could not be verified and the webfinger of the account
was last retrieved longer than the cache period, try re-resolving the
account and then attempting to verify the signature again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activitypub Protocol-related changes, federation bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants