Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #4773: Added '#' as a valid Password Character #4833

Merged
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
4 changes: 2 additions & 2 deletions chaoscenter/authentication/pkg/utils/sanitizers.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func SanitizeString(input string) string {
/*
ValidateStrictPassword represents and checks for the following patterns:
- Input is at least 8 characters long and at most 16 characters long
- Input contains at least one special character of these @$!%*?_&
- Input contains at least one special character of these @$!%*?_&#
- Input contains at least one digit
- Input contains at least one uppercase alphabet
- Input contains at least one lowercase alphabet
Expand All @@ -33,7 +33,7 @@ func ValidateStrictPassword(input string) error {
digits := `[0-9]{1}`
lowerAlphabets := `[a-z]{1}`
capitalAlphabets := `[A-Z]{1}`
specialCharacters := `[@$!%*?_&]{1}`
specialCharacters := `[@$!%*?_&#]{1}`
if b, err := regexp.MatchString(digits, input); !b || err != nil {
return fmt.Errorf("password does not contain digits")
}
Expand Down
6 changes: 3 additions & 3 deletions chaoscenter/web/src/constants/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const USERNAME_REGEX = /^[a-zA-Z][a-zA-Z0-9_-]{2,15}$/;
// ^(?=.*[a-z]) # At least one lowercase letter
// (?=.*[A-Z]) # At least one uppercase letter
// (?=.*\d) # At least one digit
// (?=.*[@$!%*?_&]) # At least one special character @$!%*?_&
// [A-Za-z\d@$!%*?_&] # Allowed characters: letters, digits, special characters @$!%*?_&
// (?=.*[@$!%*?_&#]) # At least one special character @$!%*?_&#
// [A-Za-z\d@$!%*?_&#] # Allowed characters: letters, digits, special characters @$!%*?_&#
// {8,16}$ # Length between 8 to 16 characters
export const PASSWORD_REGEX = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?_&])[A-Za-z\d@$!%*?_&]{8,16}$/;
export const PASSWORD_REGEX = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?_&#])[A-Za-z\d@$!%*?_&#]{8,16}$/;
Loading