Merged in fix/password-remove-hash (pull request #2487)

Remove # from allowed characters in password field

* Remove # from allowed characters in password field

* Fixed tests

* Fixed tests
This commit is contained in:
Linus Flood
2025-07-01 07:19:50 +00:00
parent 7eb8deb208
commit 1b95acad29
2 changed files with 1 additions and 2 deletions

View File

@@ -7,7 +7,6 @@ const testCases = [
// Valid passwords // Valid passwords
{ password: "Password123!", description: "standard valid password" }, { password: "Password123!", description: "standard valid password" },
{ password: "ValidPass1@", description: "valid with @" }, { password: "ValidPass1@", description: "valid with @" },
{ password: "TestPass9#", description: "valid with #" },
// Edge cases for length // Edge cases for length
{ password: "Pass123!", description: "8 characters (too short for both)" }, { password: "Pass123!", description: "8 characters (too short for both)" },

View File

@@ -24,7 +24,7 @@ export const passwordValidators = {
}, },
allowedCharacters: { allowedCharacters: {
matcher: (password: string) => matcher: (password: string) =>
/^[A-Za-zåäöæøüßÅÄÖÆØÜ0-9&!?()@#$%^+=_\*\-]+$/.test(password), /^[A-Za-zåäöæøüßÅÄÖÆØÜ0-9&!?()@$%^+=_\*\-]+$/.test(password),
message: "Only allowed characters", message: "Only allowed characters",
}, },
} }