File tree Expand file tree Collapse file tree
backend/src/services/auth
frontend/src/modules/user Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class AuthService {
3838
3939 const existingUser = await UserRepository . findByEmail ( email , options )
4040
41- const passwordRegex = / ^ (? = .* [ A - Z a - z ] ) (? = .* \d ) (? = .* [ @ $ ! % * # ? & ] ) [ A - Z a - z \d @ $ ! % * # ? & ] { 8 , } $ /
41+ const passwordRegex = / ^ (? = .* [ A - Z a - z ] ) (? = .* \d ) (? = .* [ ^ A - Z a - z \d ] ) ( [ ^ \t ] { 8 , } ) $ /
4242
4343 if ( ! passwordRegex . test ( password ) ) {
4444 throw new Error400 ( options . language , 'auth.passwordInvalid' )
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const fields = {
3131 } ) ,
3232 password : new StringField ( 'password' , label ( 'password' ) , {
3333 required : true ,
34- matches : / ^ (? = .* [ A - Z a - z ] ) (? = .* \d ) (? = .* [ @ $ ! % * # ? & ] ) [ A - Z a - z \d @ $ ! % * # ? & ] { 8 , } $ / ,
34+ matches : / ^ (? = .* [ A - Z a - z ] ) (? = .* \d ) (? = .* [ ^ A - Z a - z \d ] ) ( [ ^ \t ] { 8 , } ) $ / ,
3535 } ) ,
3636 passwordSignin : new StringField ( 'password' , label ( 'password' ) , {
3737 required : true ,
You can’t perform that action at this time.
0 commit comments