1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-03-16 06:14:57 +01:00

Fix http / https check in setup

Summary:
There was a last-minute edit to this to fix a typo before rP089d8327 landed
which accidentally made it impossible to pass the check. :)

Test Plan:
Put install into setup mode, changed protocol to 'http', 'ftp'.

Reviewed By: cadamo
Reviewers: toulouse, codeblock, cadamo
Commenters: toulouse, codeblock
CC: aran, cadamo, toulouse, codeblock
Differential Revision: 434
This commit is contained in:
epriestley 2011-06-11 14:41:05 -07:00
parent 4fac86c513
commit d22e6b277f

View file

@ -132,7 +132,11 @@ class PhabricatorSetup {
} else {
$host = PhabricatorEnv::getEnvConfig('phabricator.base-uri');
$protocol = id(new PhutilURI($host))->getProtocol();
if (!($protocol === 'http') || !($protocol === 'https')) {
$allowed_protocols = array(
'http' => true,
'https' => true,
);
if (empty($allowed_protocols[$protocol])) {
self::writeFailure();
self::write(
"You must specify the protocol over which your host works (e.g.: ".