Disable JSON shield for uncaught exception responses to Conduit requests
Summary: Modern conduit responses should never have a JSON shield. We disable it for normal responses, but uncaught exceptions hit this higher-level handler block which fails to disable the shield. Disable the shield. Test Plan: Inspection. Reviewers: btrahan, andrewjcg Reviewed By: andrewjcg CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5483
This commit is contained in:
@@ -137,6 +137,7 @@ class AphrontDefaultApplicationConfiguration
|
|||||||
$response->setErrorInfo($ex->getMessage());
|
$response->setErrorInfo($ex->getMessage());
|
||||||
|
|
||||||
return id(new AphrontJSONResponse())
|
return id(new AphrontJSONResponse())
|
||||||
|
->setAddJSONShield(false)
|
||||||
->setContent($response->toDictionary());
|
->setContent($response->toDictionary());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user