From 7e1f5bc9df622c74f9467e377a04419e8ccecfe2 Mon Sep 17 00:00:00 2001 From: Nick Harper Date: Wed, 5 Sep 2012 14:16:46 -0700 Subject: [PATCH] Allow redirecting when not logged in Summary: Without this, the https redirect doesn't work if you're not logged in, because the login check in willBeginExecution happens before the redirect controller can redirect. This also has the unpleasant effect of the login page on http (when it should have redirected to https) not having any css or js. Test Plan: With the https redirect enabled, loaded phabricator without being logged in, and saw that I got redirected to the https login page instead of seeing a http login page. Reviewers: epriestley, vrana Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3438 --- .../base/controller/PhabricatorRedirectController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/applications/base/controller/PhabricatorRedirectController.php b/src/applications/base/controller/PhabricatorRedirectController.php index b7b03fdf7a..a841554879 100644 --- a/src/applications/base/controller/PhabricatorRedirectController.php +++ b/src/applications/base/controller/PhabricatorRedirectController.php @@ -20,6 +20,14 @@ final class PhabricatorRedirectController extends PhabricatorController { private $uri; + public function shouldRequireLogin() { + return false; + } + + public function shouldRequireEnabledUser() { + return false; + } + public function willProcessRequest(array $data) { $this->uri = $data['uri']; }