Skip to content

Commit

Permalink
fix: percent-encode outgoing webfinger requests
Browse files Browse the repository at this point in the history
resolves #12531 - note that incoming percent-encoded webfinger works just fine :)
  • Loading branch information
oplik0 committed Apr 25, 2024
1 parent ab055a7 commit 3d1e2cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/activitypub/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Helpers.query = async (id) => {
let response;
let body;
try {
({ response, body } = await request.get(`https://${hostname}/.well-known/webfinger?resource=acct:${id}`));
({ response, body } = await request.get(`https://${hostname}/.well-known/webfinger?resource=acct%3a${encodeURIComponent(id)}`));
} catch (e) {
return false;
}
Expand Down

0 comments on commit 3d1e2cd

Please sign in to comment.