Node.js based forum software built for the modern web
fix: tweak user.search to better handle local usernames with colons in them
Julian Lamc346177bb968
diff --git a/src/user/search.js b/src/user/search.jsindex c636ca149e..d7ce37d083 100644--- a/src/user/search.js+++ b/src/user/search.js@@ -94,9 +94,11 @@ module.exports = function (User) {const data = await db.getSortedSetRangeByLex(`${searchBy}:sorted`, min, max, 0, hardCap);// const uids = data.map(data => data.split(':').pop());const uids = data.map((data) => {- data = data.split(':');- data.shift();- return data.join(':');+ if (data.includes(':https:')) {+ return data.substring(data.indexOf(':https:') + 1);+ }++ return data.split(':').pop();});return uids;}