Changeset View
Changeset View
Standalone View
Standalone View
support/PhabricatorStartup.php
| Show First 20 Lines • Show All 368 Lines • ▼ Show 20 Lines | public static function didFatal($message, $log_message = null) { | ||||
| } | } | ||||
| header( | header( | ||||
| 'Content-Type: text/plain; charset=utf-8', | 'Content-Type: text/plain; charset=utf-8', | ||||
| $replace = true, | $replace = true, | ||||
| $http_error = 500); | $http_error = 500); | ||||
| error_log($log_message); | error_log($log_message); | ||||
| echo $message; | echo $message."\n"; | ||||
| exit(1); | exit(1); | ||||
| } | } | ||||
| /* -( Validation )--------------------------------------------------------- */ | /* -( Validation )--------------------------------------------------------- */ | ||||
| ▲ Show 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | if (extension_loaded('apc')) { | ||||
| if (isset($known_bad[$apc_version])) { | if (isset($known_bad[$apc_version])) { | ||||
| self::didFatal( | self::didFatal( | ||||
| "You have APC {$apc_version} installed. This version of APC is ". | "You have APC {$apc_version} installed. This version of APC is ". | ||||
| "known to be bad, and does not work with Phabricator (it will ". | "known to be bad, and does not work with Phabricator (it will ". | ||||
| "cause Phabricator to fatal unrecoverably with nonsense errors). ". | "cause Phabricator to fatal unrecoverably with nonsense errors). ". | ||||
| "Downgrade to version 3.1.13."); | "Downgrade to version 3.1.13."); | ||||
| } | } | ||||
| } | } | ||||
| if (isset($_SERVER['HTTP_PROXY'])) { | |||||
| self::didFatal( | |||||
| 'This HTTP request included a "Proxy:" header, poisoning the '. | |||||
| 'environment (CVE-2016-5385 / httpoxy). Declining to process this '. | |||||
| 'request. For details, see: https://phurl.io/u/httpoxy'); | |||||
| } | |||||
| } | } | ||||
| /** | /** | ||||
| * @task validation | * @task validation | ||||
| */ | */ | ||||
| private static function verifyRewriteRules() { | private static function verifyRewriteRules() { | ||||
| if (isset($_REQUEST['__path__']) && strlen($_REQUEST['__path__'])) { | if (isset($_REQUEST['__path__']) && strlen($_REQUEST['__path__'])) { | ||||
| ▲ Show 20 Lines • Show All 396 Lines • Show Last 20 Lines | |||||