Browse Source

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 3 years ago
parent
commit
a12610acee
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/app/src/server/middlewares/login-form-validator.ts

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

@@ -47,8 +47,8 @@ export const inviteValidation = (req, res, next) => {
 export const loginRules = () => {
 export const loginRules = () => {
   return [
   return [
     body('loginForm.username')
     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()
       .not()
       .isEmpty()
       .isEmpty()
       .withMessage('Username field is required'),
       .withMessage('Username field is required'),