Explorar o código

Merge pull request #6232 from weseek/fix/100063-error-when-trying-login-with-an-email-that-contains-plus-sign

fix: Error when trying login with an email that contains plus sign
Yuki Takei %!s(int64=3) %!d(string=hai) anos
pai
achega
a12610acee

+ 2 - 2
packages/app/src/server/middlewares/login-form-validator.ts

@@ -47,8 +47,8 @@ export const inviteValidation = (req, res, next) => {
 export const loginRules = () => {
   return [
     body('loginForm.username')
-      .matches(/^[\da-zA-Z\-_.@]+$/)
-      .withMessage('Username has invalid characters')
+      .matches(/^[\da-zA-Z\-_.+@]+$/)
+      .withMessage('Username or E-mail has invalid characters')
       .not()
       .isEmpty()
       .withMessage('Username field is required'),