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

Webfinger queries require %-encoded parameters #12531

Closed
jernst opened this issue Apr 24, 2024 · 1 comment
Closed

Webfinger queries require %-encoded parameters #12531

jernst opened this issue Apr 24, 2024 · 1 comment
Labels

Comments

@jernst
Copy link

jernst commented Apr 24, 2024

NodeBB version

No response

NodeBB git hash

No response

NodeJS version

No response

Installed NodeBB plugins

No response

Database type

No response

Database version

No response

Exact steps to cause this issue

No response

What you expected

No response

What happened instead

No response

Anything else?

This comes from a review of https://github.com/NodeBB/NodeBB/blob/activitypub/test/activitypub.js.

The Webfinger queries performed all do not percent-encode the URL parameters, e.g. .../webfinger?resource=acct:foobar@${host} vs .../webfinger?resource=acct%3afoobar%40${host}, which RFC7033 specifically requires. See https://datatracker.ietf.org/doc/html/rfc7033#section-4.1

I did not review the actual code that this tests, which presumably also might need adjusting.

@jernst jernst added the bug label Apr 24, 2024
@jernst jernst changed the title Webfinger queries require %-escaped parameters Webfinger queries require %-encoded parameters Apr 24, 2024
oplik0 added a commit that referenced this issue Apr 25, 2024
resolves #12531 - note that incoming percent-encoded webfinger works just fine :)
@oplik0
Copy link
Contributor

oplik0 commented Apr 25, 2024

Done, we were accepting such requests just fine (so the tests should work fine either way :), but it seems that fetch isn't doing this kind of encoding of query params by default. In the end I just used URLSearchParams to achieve this instead, since it percent-encodes everything correctly.

@oplik0 oplik0 closed this as completed Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants