mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
Sanitize debug text before sending
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
@@ -18,10 +18,12 @@ $token = isset($_GET["token"]) ? $_GET["token"] : "";
|
||||
check_csrf($token);
|
||||
|
||||
function echoEvent($datatext) {
|
||||
$data = htmlspecialchars($datatext);
|
||||
|
||||
if(!isset($_GET["IE"]))
|
||||
echo "data: ".implode("\ndata: ", explode("\n", $datatext))."\n\n";
|
||||
echo "data: ".implode("\ndata: ", explode("\n", $data))."\n\n";
|
||||
else
|
||||
echo $datatext;
|
||||
echo $data;
|
||||
}
|
||||
|
||||
if(isset($_GET["upload"]))
|
||||
|
||||
Reference in New Issue
Block a user