Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DDF94106AA for ; Thu, 20 Mar 2014 18:47:08 +0000 (UTC) Received: (qmail 97231 invoked by uid 500); 20 Mar 2014 18:47:04 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 97103 invoked by uid 500); 20 Mar 2014 18:47:00 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 96786 invoked by uid 99); 20 Mar 2014 18:46:50 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Mar 2014 18:46:50 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 79F87986A1E; Thu, 20 Mar 2014 18:46:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: johnsca@apache.org To: allura-commits@incubator.apache.org Date: Thu, 20 Mar 2014 18:46:55 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [07/10] git commit: [#6701] Improve reliability of auth check [#6701] Improve reliability of auth check Signed-off-by: Cory Johns 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 Authored: Tue Mar 18 21:35:43 2014 +0000 Committer: Cory Johns 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):