diff --git a/html/includes/forms/ack-alert.inc.php b/html/includes/forms/ack-alert.inc.php index 351825fb7..a89c4d694 100644 --- a/html/includes/forms/ack-alert.inc.php +++ b/html/includes/forms/ack-alert.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); $alert_id = mres($_POST['alert_id']); $state = mres($_POST['state']); diff --git a/html/includes/forms/alert-templates.inc.php b/html/includes/forms/alert-templates.inc.php index 74fda1b8c..4b1ef9c12 100644 --- a/html/includes/forms/alert-templates.inc.php +++ b/html/includes/forms/alert-templates.inc.php @@ -21,6 +21,7 @@ * @package LibreNMS * @subpackage Alerts */ +header('Content-type: text/plain'); if(is_admin() === false) { die('ERROR: You need to be admin'); diff --git a/html/includes/forms/attach-alert-template.inc.php b/html/includes/forms/attach-alert-template.inc.php index 9303b4eaa..b38936255 100644 --- a/html/includes/forms/attach-alert-template.inc.php +++ b/html/includes/forms/attach-alert-template.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); if (is_admin() === false) { die('ERROR: You need to be admin'); diff --git a/html/includes/forms/delete-alert-rule.inc.php b/html/includes/forms/delete-alert-rule.inc.php index 5c3e15744..78b758f59 100644 --- a/html/includes/forms/delete-alert-rule.inc.php +++ b/html/includes/forms/delete-alert-rule.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); if (is_admin() === false) { die('ERROR: You need to be admin'); diff --git a/html/includes/forms/delete-alert-template.inc.php b/html/includes/forms/delete-alert-template.inc.php index c700a351a..1892785a3 100644 --- a/html/includes/forms/delete-alert-template.inc.php +++ b/html/includes/forms/delete-alert-template.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); if (is_admin() === false) { die('ERROR: You need to be admin'); diff --git a/html/includes/forms/parse-alert-map.inc.php b/html/includes/forms/parse-alert-map.inc.php index 075de355b..877ad16ca 100644 --- a/html/includes/forms/parse-alert-map.inc.php +++ b/html/includes/forms/parse-alert-map.inc.php @@ -13,6 +13,7 @@ */ if (is_admin() === false) { + header('Content-type: text/plain'); die('ERROR: You need to be admin'); } @@ -31,5 +32,6 @@ if (is_numeric($map_id) && $map_id > 0) { 'rule' => $map['name'], 'target' => $map['target'], ); + header('Content-type: application/json'); echo _json_encode($output); } diff --git a/html/includes/forms/parse-alert-rule.inc.php b/html/includes/forms/parse-alert-rule.inc.php index 286fb35c8..4372303bf 100644 --- a/html/includes/forms/parse-alert-rule.inc.php +++ b/html/includes/forms/parse-alert-rule.inc.php @@ -13,6 +13,7 @@ */ if (is_admin() === false) { + header('Content-type: text/plain'); die('ERROR: You need to be admin'); } @@ -29,5 +30,6 @@ if (is_numeric($alert_id) && $alert_id > 0) { 'name' => $rule['name'], 'rules' => $rule_split, ); + header('Content-type: application/json'); echo _json_encode($output); } diff --git a/html/includes/forms/parse-alert-template.inc.php b/html/includes/forms/parse-alert-template.inc.php index 2b8bb2e56..dd04ec575 100644 --- a/html/includes/forms/parse-alert-template.inc.php +++ b/html/includes/forms/parse-alert-template.inc.php @@ -13,6 +13,7 @@ */ if (is_admin() === false) { + header('Content-type: text/plain'); die('ERROR: You need to be admin'); } @@ -26,5 +27,6 @@ if (is_numeric($template_id) && $template_id > 0) { 'title' => $template['title'], 'title_rec' => $template['title_rec'], ); + header('Content-type: application/json'); echo _json_encode($output); } diff --git a/html/includes/forms/sensor-alert-reset.inc.php b/html/includes/forms/sensor-alert-reset.inc.php index 2c027e647..46c1fc976 100644 --- a/html/includes/forms/sensor-alert-reset.inc.php +++ b/html/includes/forms/sensor-alert-reset.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); // FUA diff --git a/html/includes/forms/sensor-alert-update.inc.php b/html/includes/forms/sensor-alert-update.inc.php index 16c5742a6..d03024480 100644 --- a/html/includes/forms/sensor-alert-update.inc.php +++ b/html/includes/forms/sensor-alert-update.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); // FUA diff --git a/html/includes/forms/update-alert-rule.inc.php b/html/includes/forms/update-alert-rule.inc.php index 261e30062..1bd575081 100644 --- a/html/includes/forms/update-alert-rule.inc.php +++ b/html/includes/forms/update-alert-rule.inc.php @@ -11,6 +11,7 @@ * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ +header('Content-type: text/plain'); if (is_admin() === false) { die('ERROR: You need to be admin');