-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat(group): Sanitize group names and ids on creation #56222
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
Conversation
fda3b6b to
21b5f96
Compare
It does not make sense to allow group name with weird white space sequence going forward. Same for group ids, in which we do not really want white space. Signed-off-by: Louis Chmn <[email protected]>
21b5f96 to
9890117
Compare
| return mb_strlen($displayName) > 64 | ||
| ? hash('sha256', $displayName) | ||
| : $displayName; | ||
| $displayNameWithoutWhitespace = preg_replace('/\s+/', '_', $displayName); |
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.
Maybe the opportunity to be even more restrictive on the GID sanitation. Should it contain special Unicode characters, quotes, accentuation, emoji?
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.
Just to be clear, this is only for new groups. We still have to support all those other things on already existing groups
|
This is a breaking behavioral change. At the very least it must be added to critical changes. For instance it breaks SAML integration tests, and there might be users who automate group provisioning and may run into it as well. But I would recommend to revert it. Logic has to be kept in place, foreign backends are not effected. This causes more problems than it solves. |
It does not make sense to allow group name with weird white space sequence going forward.
Same for group ids, in which we do not really want white space.