Skip to content

Node.js based forum software built for the modern web

fix: crash in resolveLocalId if Number is passed in

Julian Lamd51f5e592249
diff --git a/src/activitypub/helpers.js b/src/activitypub/helpers.js
index 04118b8f63..7153deb6c9 100644
--- a/src/activitypub/helpers.js
+++ b/src/activitypub/helpers.js
@@ -111,7 +111,7 @@ Helpers.resolveLocalId = async (input) => {
}
return { type: null, id: null };
- } else if (input.indexOf('@') !== -1) { // Webfinger
+ } else if (String(input).indexOf('@') !== -1) { // Webfinger
const [slug] = input.replace(/^acct:/, '').split('@');
const uid = await user.getUidByUserslug(slug);
return { type: 'user', id: uid };