From 8fa40923beb7e72d3c878648d9e19dfed4c412b4 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Mon, 1 May 2017 20:02:09 -0400 Subject: [PATCH] Escape tail output Fixes #486 --- scripts/pi-hole/php/tailLog.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/php/tailLog.php b/scripts/pi-hole/php/tailLog.php index bf23941a..ce572f01 100644 --- a/scripts/pi-hole/php/tailLog.php +++ b/scripts/pi-hole/php/tailLog.php @@ -30,7 +30,7 @@ if(isset($_GET["offset"])) fseek($file, $offset); $lines = []; while (!feof($file)) - array_push($lines,fgets($file)); + array_push($lines, htmlspecialchars(fgets($file))); die(json_encode(array("offset" => ftell($file), "lines" => $lines))); } }