mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: handle webfinger responses with subject missing scheme
This commit is contained in:
@@ -131,9 +131,12 @@ Helpers.query = async (id) => {
|
||||
({ href: actorUri } = actorUri);
|
||||
}
|
||||
|
||||
const { subject, publicKey } = body;
|
||||
let { subject, publicKey } = body;
|
||||
// Fix missing scheme
|
||||
if (!subject.startsWith('acct:') && !subject.startsWith('did:')) {
|
||||
subject = `acct:${subject}`;
|
||||
}
|
||||
const payload = { subject, username, hostname, actorUri, publicKey };
|
||||
|
||||
const claimedId = new URL(subject).pathname;
|
||||
webfingerCache.set(claimedId, payload);
|
||||
if (claimedId !== id) {
|
||||
|
||||
Reference in New Issue
Block a user