Revert "fix(lint): whitespace; also revert username fix for further QA"

This reverts commit dcd15a58ebf41d9e44c89c675419ecb7d36b946d.
This commit is contained in:
Kalista Payne
2026-01-07 14:14:20 -06:00
parent 43808696a8
commit 7559feec8e
2 changed files with 10 additions and 3 deletions
+7 -2
View File
@@ -98,6 +98,11 @@ export async function loginSocial (req, res) { // eslint-disable-line import/pre
throw new NotFound(res.t('userNotFound'));
}
let sanitizedUsername = username.replace(/[^a-zA-Z0-9_-]/g, '');
if (!sanitizedUsername) {
sanitizedUsername = generateUsername();
}
if (existingUser) {
existingUser.auth[network] = {
id: profile.id,
@@ -112,8 +117,8 @@ export async function loginSocial (req, res) { // eslint-disable-line import/pre
emails: profile.emails,
},
local: {
username,
lowerCaseUsername: username.toLowerCase(),
username: sanitizedUsername,
lowerCaseUsername: sanitizedUsername.toLowerCase(),
email,
},
},