From 41b32d5fbe9d3e5cf39368c680d039925f104219 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 30 Mar 2013 19:04:40 -0700 Subject: [PATCH] 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 --- .../configuration/AphrontDefaultApplicationConfiguration.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php index 753fffef3a..de64e1efbf 100644 --- a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php +++ b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php @@ -137,6 +137,7 @@ class AphrontDefaultApplicationConfiguration $response->setErrorInfo($ex->getMessage()); return id(new AphrontJSONResponse()) + ->setAddJSONShield(false) ->setContent($response->toDictionary()); }