[Pypi-checkins] r978 - trunk/pypi

richard python-checkins at python.org
Mon Sep 5 07:52:52 CEST 2011


Author: richard
Date: Mon Sep  5 07:52:52 2011
New Revision: 978

Modified:
   trunk/pypi/webui.py
Log:
protocol tweak undo

Modified: trunk/pypi/webui.py
==============================================================================
--- trunk/pypi/webui.py	(original)
+++ trunk/pypi/webui.py	Mon Sep  5 07:52:52 2011
@@ -3086,11 +3086,14 @@
             return False
         qs = urlparse.urlparse(identity).query
         username = urlparse.parse_qs(qs).get("username",[None])[0]
-        if username != self.username:
-            # identity is not owned by user so decline the request
-            False
-
-        return self.store.check_openid_trustedroot(self.username, orequest.trust_root)
+        if username == self.username:
+            if self.store.check_openid_trustedroot(self.username, orequest.trust_root):
+                return True
+            else:
+                return False
+        # identity is not owned by user so decline the request
+        answer = orequest.answer(False)
+        self.openid_response(answer)
 
     def openid_user_url(self):
         if self.authenticated:


More information about the Pypi-checkins mailing list