Skip to content

Commit

Permalink
Let PhabricatorPlatformSite catch unconfigured requests
Browse files Browse the repository at this point in the history
Summary: Fix T8717. If the install didn't configure base-uri, assume they want Phabricator; We'll later show the setup warning about it.

Test Plan: Set base-uri to something else, see short error. Delete it, see Phabricator.

Reviewers: laomoi, #blessed_reviewers, epriestley

Reviewed By: laomoi, #blessed_reviewers, epriestley

Subscribers: laomoi, epriestley, Korvin

Maniphest Tasks: T8717

Differential Revision: https://secure.phabricator.com/D13482
  • Loading branch information
epriestley committed Jun 30, 2015
1 parent 12c6e63 commit 9eda214
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/aphront/site/PhabricatorPlatformSite.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ public function getPriority() {
}

public function newSiteForRequest(AphrontRequest $request) {
// If no base URI has been configured yet, match this site so the user
// can follow setup instructions.
$base_uri = PhabricatorEnv::getEnvConfig('phabricator.base-uri');
if (!strlen($base_uri)) {
return new PhabricatorPlatformSite();
}

$uris = array();
$uris[] = PhabricatorEnv::getEnvConfig('phabricator.base-uri');
$uris[] = $base_uri;
$uris[] = PhabricatorEnv::getEnvConfig('phabricator.production-uri');

$allowed = PhabricatorEnv::getEnvConfig('phabricator.allowed-uris');
Expand Down

0 comments on commit 9eda214

Please sign in to comment.