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

More robust verification of the "me" value #22

Closed
simonw opened this issue Nov 19, 2020 · 1 comment
Closed

More robust verification of the "me" value #22

simonw opened this issue Nov 19, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@simonw
Copy link
Owner

simonw commented Nov 19, 2020

I think I fixed the security hole with this change, but there are further security recommendations that I should follow, specifically around following redirects:

https://indieauth.spec.indieweb.org/#differing-user-profile-urls

Upon validation, clients MUST check the me value from the profile URL response or access token response, and take the following validation steps:

  • It MUST follow any permanent redirections from this URL to discover the canonical profile URL, in the same manner as initial profile URL discovery.
  • It MUST verify that the canonical profile URL is on the same domain as the initially-entered profile URL.
  • It MUST verify that the canonical profile URL declares the same authorization_endpoint as the initially-entered profile URL.
@simonw simonw added the bug Something isn't working label Nov 19, 2020
@simonw
Copy link
Owner Author

simonw commented Nov 19, 2020

Step one: I'll follow the permanent URL redirects, with a maximum of 5 redirects - if that number is exceeded I'll error. If any temporary redirects are encountered I will error as well. Treat this as the finished URL.

Step two: fetch the HTML and check that it has an authorization_endpoint that matches the original one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant