mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Returning simple text error message instead of HTML for requests where HTML won't be rendered for the user. Fixes T2401.
Summary: If the check is too much, let me know. I noticed you send over __ajax__=true, so I figured it was safest to evaluate existance and value. Test Plan: Included unit test. Would have included a test where __ajax__ and __conduit__ are not set, but without mocking this gives an uncatchable Fatal Error. If you want me to include it, just direct me on the mocking strategy. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2401 Differential Revision: https://secure.phabricator.com/D4719
This commit is contained in:
parent
7c5f0250a6
commit
bdecadfd11
1 changed files with 9 additions and 0 deletions
|
@ -10,6 +10,15 @@ final class PhabricatorConfigResponse extends AphrontHTMLResponse {
|
|||
}
|
||||
|
||||
public function buildResponseString() {
|
||||
// Check to make sure we aren't requesting this via ajax or conduit
|
||||
if (isset($_REQUEST['__ajax__']) || isset($_REQUEST['__conduit__'])) {
|
||||
// We don't want to flood the console with html, just return a simple
|
||||
// message for now.
|
||||
return pht(
|
||||
"This install has a fatal setup error, access the internet web ".
|
||||
"version to view details and resolve it.");
|
||||
}
|
||||
|
||||
$resources = $this->buildResources();
|
||||
|
||||
$view = $this->view->render();
|
||||
|
|
Loading…
Reference in a new issue