-
Notifications
You must be signed in to change notification settings - Fork 3
The subject field of grants needs to be a string, not an array. #50
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
This was always in the jwt specification, but was not enforced in the jwt python library until recently. jpadilla/pyjwt#1005 disable verification of the sub field until we're sure new tokens are correct in ~4 months
src/delegate.py
Outdated
| if any(',' in s for s in existing_sub if isinstance(s, str)): | ||
| return bad_request('', 'existing sub chain contains invalid comma') |
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.
als existing_sub een string is gaat dit problemen geven denk ik
[s for s in "foo"" is ["f", "o", "o"] IIRC
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.
klopt. ik kijk naar een fix
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.
misschien iets als
if isinstance(existing_sub, str):
existing_sub = existing_sub.split()
boven de if any
src/delegate.py
Outdated
| 'domains': list(domains), | ||
| 'azp': refresh_token['azp'], # Authorized Party | ||
| 'sub': refresh_token.get('sub', []) + [subject], # subject | ||
| 'sub': ', '.join(existing_sub + [subject]), # sub must be string adhering to jwt spec: https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2 |
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.
ik zou , zonder spatie gebruiken, is iets eenvoudiger in de split
23a369e to
89ceaef
Compare
f9323ea to
79b9a6e
Compare
This was always in the jwt specification, but was not enforced in the jwt python library until recently.
jpadilla/pyjwt#1005
disable verification of the sub field until we're sure new tokens are correct in ~4 months