Skip to content
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

Matching response_types for authz requests is too strict #399

Closed
schlenk opened this issue Jul 19, 2017 · 2 comments
Closed

Matching response_types for authz requests is too strict #399

schlenk opened this issue Jul 19, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@schlenk
Copy link
Collaborator

schlenk commented Jul 19, 2017

To reproduce:

Register a client for the response_types=['token id_token'] for an implicit flow.
Try to get an access token with response_type='id_token token' and it fails, try it with response_type='token id_token' and it works.

Both forms should work according to RFC 6749 3.1.1.

Extension response types MAY contain a space-delimited (%x20) list of
values, where the order of values does not matter (e.g., response
type "a b" is the same as "b a").

The code responsible for this is in provider.py and is a bit too dumb to handle permutations of the order.

try:
    rtypes = _cinfo['response_types']
except KeyError:
    rtypes = ['code']  # default according to OIDC registration

if ' '.join(areq["response_type"]) not in rtypes:
    return error("invalid_request",
                       "Trying to use unregistered response_typ")
@rohe
Copy link
Collaborator

rohe commented Jul 27, 2017

Granted. Do a PR and I'll accept it.

@decentral1se decentral1se added this to the P1: MUST milestone Aug 6, 2017
@rohe rohe mentioned this issue Sep 27, 2017
1 task
@rohe
Copy link
Collaborator

rohe commented Sep 28, 2017

Resolve in PR #427

@rohe rohe closed this as completed Sep 28, 2017
andrewkrug pushed a commit to mozilla-iam/pyoidc that referenced this issue Jun 6, 2019
Matching response_types for authz requests is too strict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants