diff --git a/file_echo.php b/file_echo.php index d910b74e28..031093ba1b 100644 --- a/file_echo.php +++ b/file_echo.php @@ -57,12 +57,16 @@ if (isset($_REQUEST['filename']) && isset($_REQUEST['image'])) { } else if (isset($_REQUEST['monitorconfig'])) { /* For monitor chart config export */ - PMA_downloadHeader('monitor.cfg', 'application/force-download'); + PMA_downloadHeader('monitor.cfg', 'application/json; charset=UTF-8'); + header('X-Content-Type-Options: nosniff'); + echo urldecode($_REQUEST['monitorconfig']); } else if (isset($_REQUEST['import'])) { /* For monitor chart config import */ - header('Content-type: text/plain'); + header('Content-Type: application/json; charset=UTF-8'); + header('X-Content-Type-Options: nosniff'); + if (!file_exists($_FILES['file']['tmp_name'])) { exit(); }