-
Notifications
You must be signed in to change notification settings - Fork 5
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
allow case sensitive regex matches for the MAGPIE_USER_NAME_EXTRA_REGEX
setting
#594
allow case sensitive regex matches for the MAGPIE_USER_NAME_EXTRA_REGEX
setting
#594
Conversation
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.
param_compare=re.compile(...)
can be passed directly with any desired flags.
No need for the regex_flags
parameter.
I like the idea of re.X
being the default however, and not assume re.I
by default.
All current regex used [A-Za-z]
explicitly anyway, so they should still work with only re.X
.
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.
Looks good. Just waiting on tests to complete validation.
@fmigneault The tests are failing because |
Validated that CEDA has planned down server until November 7. |
Ensures that the settings/environment variable
MAGPIE_USER_NAME_EXTRA_REGEX
is case sensitive.Previously, the check was case insensitive meaning that it could not be used to restrict usernames based on case.
For example, setting this value to
^[a-z]+$
would have permit the username"someuser"
as well as"Someuser"
.Now, the same regular expression will not match
"Someuser"
since case sensitivity in enforced.