Merge pull request #150 from wojtek-fliposports/uri_fragment_fix

Uri fragment fix.
This commit is contained in:
Juan Ignacio Fiorentino 2017-01-25 10:30:46 -03:00 committed by GitHub
commit b1bf9072d0

View file

@ -122,7 +122,7 @@ class AuthorizeEndpoint(object):
def create_response_uri(self):
uri = urlsplit(self.params['redirect_uri'])
query_params = parse_qs(uri.query)
query_fragment = parse_qs(uri.fragment)
query_fragment = {}
try:
if self.grant_type in ['authorization_code', 'hybrid']:
@ -210,8 +210,7 @@ class AuthorizeEndpoint(object):
logger.debug('[Authorize] Error when trying to create response uri: %s', error)
raise AuthorizeError(self.params['redirect_uri'], 'server_error', self.grant_type)
uri = uri._replace(query=urlencode(query_params, doseq=True))
uri = uri._replace(fragment=urlencode(query_fragment, doseq=True))
uri = uri._replace(query=urlencode(query_params, doseq=True), fragment=uri.fragment + urlencode(query_fragment, doseq=True))
return urlunsplit(uri)