Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/src/services/auth/authService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class AuthService {

const existingUser = await UserRepository.findByEmail(email, options)

const passwordRegex = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,}$/
const passwordRegex = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[^A-Za-z\d])([^ \t]{8,})$/

if (!passwordRegex.test(password)) {
throw new Error400(options.language, 'auth.passwordInvalid')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/modules/user/user-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const fields = {
}),
password: new StringField('password', label('password'), {
required: true,
matches: /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,}$/,
matches: /^(?=.*[A-Za-z])(?=.*\d)(?=.*[^A-Za-z\d])([^ \t]{8,})$/,
}),
passwordSignin: new StringField('password', label('password'), {
required: true,
Expand Down