Skip to content

Commit

Permalink
[#1532] Documented whitespace in passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
msiodelski committed Oct 16, 2024
1 parent b9add14 commit 4193cbc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
[pattern]="passwordPattern"
inputStyleClass="password-input"
styleClass="password-component"
title="Must only contain letters, digits, or special characters and must be at least 8 characters long."
title="Must only contain letters, digits, special or whitespace characters and must be at least 8 characters long."
[toggleMask]="true"
></p-password>
</div>
Expand All @@ -54,7 +54,7 @@
[text]="
buildFeedbackMessage(
'newPassword',
'Password must only contain letters, digits, and special characters.'
'Password must only contain letters, digits, special or whitespace characters.'
)
"
></p-message>
Expand All @@ -66,7 +66,7 @@
formControlName="confirmPassword"
inputStyleClass="password-input"
styleClass="password-component"
title="Must only contain letters, digits, or special characters and must be at least 8 characters long."
title="Must only contain letters, digits, special or whitespace characters and must be at least 8 characters long."
[feedback]="false"
[toggleMask]="true"
></p-password>
Expand All @@ -77,7 +77,7 @@
[text]="
buildFeedbackMessage(
'confirmPassword',
'Password must only contain letters, digits, or special characters.',
'Password must only contain letters, digits, special or whitespace characters.',
true
)
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export class PasswordChangePageComponent implements OnInit {
/**
* RegExp pattern to validate password fields.
* It allows uppercase and lowercase letters A-Z,
* numbers 0-9 and all special characters.
* numbers 0-9, all special characters and whitespace
* characters (i.e., space, tab, form feed, and line feed).
*/
passwordPattern: RegExp = /^[a-zA-Z0-9~`!@#$%^&*()_+\-=\[\]\\{}|;':",.\/<>?\s]+$/

Expand Down
6 changes: 3 additions & 3 deletions webui/src/app/users-page/users-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
inputStyleClass="user-input"
styleClass="password-component"
[pattern]="passwordPattern"
title="Must only contain letters, digits, or special characters and must be at least 8 characters long."
title="Must only contain letters, digits, special or whitespace characters and must be at least 8 characters long."
[toggleMask]="true"
></p-password>
</div>
Expand All @@ -359,7 +359,7 @@
[text]="
buildFeedbackMessage(
'userPassword',
'Password must only contain letters, digits, or special characters.'
'Password must only contain letters, digits, special or whitespace characters.'
)
"
></p-message>
Expand All @@ -374,7 +374,7 @@
inputId="userPassword2"
inputStyleClass="user-input"
styleClass="password-component"
title="Must only contain letters, digits, or special characters and must be at least 8 characters long."
title="Must only contain letters, digits, special or whitespace characters and must be at least 8 characters long."
[toggleMask]="true"
></p-password>
</div>
Expand Down
3 changes: 2 additions & 1 deletion webui/src/app/users-page/users-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ export class UsersPageComponent implements OnInit, OnDestroy {
/**
* RegExp pattern to validate password fields.
* It allows uppercase and lowercase letters A-Z,
* numbers 0-9 and all special characters.
* numbers 0-9, all special characters and whitespace
* characters (i.e., space, tab, form feed, and line feed).
*/
passwordPattern: RegExp = /^[a-zA-Z0-9~`!@#$%^&*()_+\-=\[\]\\{}|;':",.\/<>?\s]+$/

Expand Down

0 comments on commit 4193cbc

Please sign in to comment.