diff options
| author | Jonathan Huot <JonathanHuot@users.noreply.github.com> | 2018-08-13 00:53:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-13 00:53:28 +0200 |
| commit | f93dca00208fecdb9b4791a33c59b27c4199d0f4 (patch) | |
| tree | ca97531d7ebb7e0ad61e0e8ab0f0fccd8e214bd1 /oauthlib | |
| parent | 37dad8391c7b9f00c93fba134e6be845e0adf2f1 (diff) | |
| parent | 21e463712e5de5f2f4866e01d65f8edb8e86994c (diff) | |
| download | oauthlib-f93dca00208fecdb9b4791a33c59b27c4199d0f4.tar.gz | |
Merge branch 'master' into invalid-grant-should-respond-with-400
Diffstat (limited to 'oauthlib')
| -rw-r--r-- | oauthlib/oauth2/rfc6749/grant_types/authorization_code.py | 2 | ||||
| -rw-r--r-- | oauthlib/oauth2/rfc6749/parameters.py | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py index 0660263..3d08871 100644 --- a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py +++ b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py @@ -312,6 +312,8 @@ class AuthorizationCodeGrant(GrantTypeBase): log.debug('Using default redirect_uri %s.', request.redirect_uri) if not request.redirect_uri: raise errors.MissingRedirectURIError(request=request) + if not is_absolute_uri(request.redirect_uri): + raise errors.InvalidRedirectURIError(request=request) # Then check for normal errors. diff --git a/oauthlib/oauth2/rfc6749/parameters.py b/oauthlib/oauth2/rfc6749/parameters.py index 9ea8c44..c5127e7 100644 --- a/oauthlib/oauth2/rfc6749/parameters.py +++ b/oauthlib/oauth2/rfc6749/parameters.py @@ -279,6 +279,10 @@ def parse_implicit_response(uri, state=None, scope=None): fragment = urlparse.urlparse(uri).fragment params = dict(urlparse.parse_qsl(fragment, keep_blank_values=True)) + for key in ('expires_in',): + if key in params: # cast things to int + params[key] = int(params[key]) + if 'scope' in params: params['scope'] = scope_to_list(params['scope']) |
