-
Notifications
You must be signed in to change notification settings - Fork 398
🐛(back) allow ASCII characters in user sub field #1295
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
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.
Please check:
- add a changelog?
- update migrations (no-op)?
We can merge it like this, but I wonder whether we should be less restrictive on the sub
field, wdyt?
src/backend/core/models.py
Outdated
), | ||
) | ||
|
||
sub = models.CharField( | ||
_("sub"), | ||
help_text=_( | ||
"Required. 255 characters or fewer. Letters, numbers, and @/./+/-/_/: characters only." | ||
"Required. 255 characters or fewer. Letters, numbers, and @.+-_:=/ characters only." |
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.
Actually the OIDC spec says the sub can contain up to 255 ASCII characters (following RFC 20 https://www.rfc-editor.org/rfc/rfc20.txt)
Subject Identifier. A locally unique and never reassigned identifier within the Issuer for the End-User, which is intended to be consumed by the Client, e.g., 24400320 or AItOawmwtWwcT0k51BayewNvutrJUqsvl6qs7A4. It MUST NOT exceed 255 ASCII [RFC20] characters in length. The sub value is a case-sensitive string.
Should we be less restrictive?
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.
So we should remove the validator?
0ea8aba
to
cd45ff6
Compare
@qbey ASCII characters are allowed now. |
Size Change: -9 B (0%) Total Size: 3.6 MB |
64f8ae6
to
d556403
Compare
All ASCII characters are allowed in a sub, we change the sub validator to reflect this. Fix #1280
d556403
to
4f3430e
Compare
Purpose
All ASCII characters are allowed in a sub, we change the sub validator to reflect this.
Proposal
Fix #1280