Skip to content
This repository was archived by the owner on Jan 30, 2021. It is now read-only.

Commit 05ced2d

Browse files
committed
Merge pull request sashka#6 from stengaard/master
Prevent a malicious user to bypass the openid auth phase.
2 parents 9130dac + 38f7dd6 commit 05ced2d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

flask_googleauth.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,8 @@ def get_authenticated_user(self, callback):
9090
# Verify the OpenID response via direct request to the OP
9191
args = dict((k, v) for k, v in request.args.items())
9292
args["openid.mode"] = u"check_authentication"
93-
url = request.args.get("openid.op_endpoint", self._OPENID_ENDPOINT)
9493

95-
r = requests.post(url, data=args)
94+
r = requests.post(self._OPENID_ENDPOINT, data=args)
9695
return self._on_authentication_verified(callback, r)
9796

9897
def _openid_args(self, callback_uri, ax_attrs=[]):
@@ -281,4 +280,3 @@ class GoogleFederated(GoogleAuth):
281280
def __init__(self, domain, app=None, url_prefix=None, name='GoogleAuth'):
282281
self._OPENID_ENDPOINT = "https://www.google.com/a/%s/o8/ud?be=o8" % domain
283282
super(GoogleFederated, self).__init__(app, url_prefix, name)
284-

0 commit comments

Comments
 (0)