From 7a0662b529d6698eb07d19d58ec12a272f0c3056 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 27 Jan 2015 08:57:34 +0000 Subject: [PATCH] need to call egw_json_request::isJSONRequest(true), before throwing an exception (or calling egw_json_request::parseRequest()), otherwise exception is not shown on client as alert --- json.php | 1 + 1 file changed, 1 insertion(+) diff --git a/json.php b/json.php index 28736362dd..3ae33cc8a2 100644 --- a/json.php +++ b/json.php @@ -100,6 +100,7 @@ if (isset($_GET['menuaction'])) //Check whether the request data is set if (isset($GLOBALS['egw_unset_vars']['_POST[json_data]'])) { + $json->isJSONRequest(true); // otherwise exception is not send back to client, as we have not yet called parseRequest() throw new egw_exception_assertion_failed("JSON Data contains script tags. Aborting..."); } $json->parseRequest($_GET['menuaction'], $_REQUEST['json_data']);