-
Notifications
You must be signed in to change notification settings - Fork 0
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
[SECURITY] Add a name validator matching keycloak constraints #17
Conversation
buchmarv
commented
Oct 4, 2024
•
edited
Loading
edited
- To see the specific tasks where the Asana app for GitHub is being used, see below:
- https://app.asana.com/0/0/1207643369134611
The regex is derived from https://github.com/keycloak/keycloak/blob/main/services/src/main/java/org/keycloak/userprofile/validator/PersonNameProhibitedCharactersValidator.java#L42 and needed some adjustments as it was not compatible with PCRE. |
'null' => [null, true], | ||
'empty string' => ['', true], | ||
'Valid name' => ['Dscherêmy-Pasquàlle Gucci', true], | ||
'Valid name 2' => ['X Æ A-12', true], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you did there.
'Opening square bracket' => ['[Harald', false], | ||
'Closing square bracket' => ['Sieglinde]', false], | ||
'Percent' => ['100% creative', false], | ||
'Exclamation mark' => ['My name\'s not Rick!', false], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed chance: I am Pickle Rick!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, never watched it. 😬
'Exclamation mark' => ['My name\'s not Rick!', false], | ||
'Hash' => ['#Snoop', false], | ||
'Question mark' => ['Am I supposed to put my name in here?', false], | ||
'Paragraph' => ['§ 307 StGB', false], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WAS IST LOS MIT DIR 😂
'Semicolon' => ['return true;', false], | ||
'Asterisk' => ['Ein *, der deinen Namen trägt.', false], | ||
'Tilde' => ['~~~oO Andiii Oo~~~', false], | ||
'Pipe' => ['Roddy |er', false], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3