refs #6434 fix: use trim
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-11-16 15:10:47 +01:00
parent 83ae0379b5
commit aea3f7b2b9
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ module.exports = function(Self) {
}); });
Self.signInValidate = (user, userToken) => { Self.signInValidate = (user, userToken) => {
const [[key, value]] = Object.entries(Self.userUses(user)); const [[key, value]] = Object.entries(Self.userUses(user));
if (userToken[key].toLowerCase() !== value.toLowerCase()) { if (userToken[key].toLowerCase().trim() !== value.toLowerCase().trim()) {
console.error('ERROR!!! - Signin with other user', userToken, user); console.error('ERROR!!! - Signin with other user', userToken, user);
throw new UserError('Try again'); throw new UserError('Try again');
} }