From 4193cbc4cda7e71b92de3be4144083dd0e944ebe Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Tue, 15 Oct 2024 21:13:49 +0200 Subject: [PATCH] [#1532] Documented whitespace in passwords --- .../password-change-page.component.html | 8 ++++---- .../password-change-page.component.ts | 3 ++- webui/src/app/users-page/users-page.component.html | 6 +++--- webui/src/app/users-page/users-page.component.ts | 3 ++- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/webui/src/app/password-change-page/password-change-page.component.html b/webui/src/app/password-change-page/password-change-page.component.html index f73c685ed..b59c998d3 100644 --- a/webui/src/app/password-change-page/password-change-page.component.html +++ b/webui/src/app/password-change-page/password-change-page.component.html @@ -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" > @@ -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.' ) " > @@ -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" > @@ -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 ) " diff --git a/webui/src/app/password-change-page/password-change-page.component.ts b/webui/src/app/password-change-page/password-change-page.component.ts index c3531faed..2b40a9f9e 100644 --- a/webui/src/app/password-change-page/password-change-page.component.ts +++ b/webui/src/app/password-change-page/password-change-page.component.ts @@ -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]+$/ diff --git a/webui/src/app/users-page/users-page.component.html b/webui/src/app/users-page/users-page.component.html index a32c73359..2c1c86e59 100644 --- a/webui/src/app/users-page/users-page.component.html +++ b/webui/src/app/users-page/users-page.component.html @@ -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" > @@ -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.' ) " > @@ -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" > diff --git a/webui/src/app/users-page/users-page.component.ts b/webui/src/app/users-page/users-page.component.ts index 328b00053..02d1c2720 100644 --- a/webui/src/app/users-page/users-page.component.ts +++ b/webui/src/app/users-page/users-page.component.ts @@ -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]+$/