Skip to content

Commit 4c8cbe3

Browse files
committed
Added an extra check
1 parent f2d027c commit 4c8cbe3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oauth2_provider/views/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def get(self, request, *args, **kwargs):
105105
scopes, credentials = self.validate_authorization_request(request)
106106

107107
# If the callback URI does not require authorization; immediately return a response
108-
if request.GET['redirect_uri'] in oauth2_settings.uris_without_auth:
108+
if 'redirect_uri' in request.GET and request.GET['redirect_uri'] in oauth2_settings.uris_without_auth:
109109
uri, headers, body, status = self.create_authorization_response(
110110
request=self.request, scopes=" ".join(scopes),
111111
credentials=credentials, allow=True)

0 commit comments

Comments
 (0)