incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [07/10] git commit: [#6701] Improve reliability of auth check
Date Thu, 20 Mar 2014 18:46:55 GMT
[#6701] Improve reliability of auth check

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/a71aa702
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a71aa702
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a71aa702

Branch: refs/heads/master
Commit: a71aa702e39696a5d40eb6fb3ade7dc7739d7429
Parents: 0bbf17d
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Tue Mar 18 21:35:43 2014 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Thu Mar 20 18:43:46 2014 +0000

----------------------------------------------------------------------
 scripts/ApacheAccessHandler.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a71aa702/scripts/ApacheAccessHandler.py
----------------------------------------------------------------------
diff --git a/scripts/ApacheAccessHandler.py b/scripts/ApacheAccessHandler.py
index 19c5207..585c6b2 100644
--- a/scripts/ApacheAccessHandler.py
+++ b/scripts/ApacheAccessHandler.py
@@ -81,8 +81,9 @@ def check_authentication(req):
     auth_url = req.get_options().get('ALLURA_AUTH_URL', 'https://127.0.0.1/auth/do_login')
     r = requests.post(auth_url, allow_redirects=False, params={
         'username': req.user,
-        'password': req.get_basic_auth_pw()})
-    return r.status_code == 302
+        'password': req.get_basic_auth_pw(),
+        'return_to': '/login_successful'})
+    return r.status_code == 302 and r.headers['location'].endswith('/login_successful')
 
 
 def check_permissions(req):


Mime
View raw message