diff --git a/CHANGELOG.md b/CHANGELOG.md index 2eadda8..6337523 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [1.9.2] - 2024-05-14 + +- Improve password regex to accept OWASP characters + ## [1.9.1] - 2024-03-26 - Remove vite-plugin-rewrite-all diff --git a/VERSION b/VERSION index 9ab8337..8fdcf38 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.9.1 +1.9.2 diff --git a/frontend/src/components/Dash/Register.vue b/frontend/src/components/Dash/Register.vue index 91c96a3..87b9dc6 100644 --- a/frontend/src/components/Dash/Register.vue +++ b/frontend/src/components/Dash/Register.vue @@ -30,7 +30,7 @@ name="password" label="Password" help="At least 1 lowercase, 1 uppercase, 1 number and 1 special character. Minimum of 12 characters" - :validation="[['required'], ['matches', /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&._-])[A-Za-z\d@$!%*?&._-]{12,}$/]]" + :validation="[['required'], ['matches', /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*\W)(?!.* ).{12,}$/]]" :validation-messages="{ matches: 'Password does not match requirements.', }" diff --git a/src/db/modules/valid/password.js b/src/db/modules/valid/password.js index 8f81346..a4867e2 100644 --- a/src/db/modules/valid/password.js +++ b/src/db/modules/valid/password.js @@ -1 +1 @@ -module.exports = (password) => /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&._-])[A-Za-z\d@$!%*?&._-]{12,}$/.test(password); +module.exports = (password) => /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*\W)(?!.* ).{12,}$/.test(password);