Skip to content

Commit a85f2c0

Browse files
committed
Fixed minor vulnerability in stats.php
1 parent 4234f5f commit a85f2c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

results/stats.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@
8686
$speedtest = getSpeedtestUserById($_GET['id']);
8787
$speedtests = [];
8888
if (false === $speedtest) {
89-
echo '<div>There was an error trying to fetch the speedtest result for ID "'.$_GET['id'].'".</div>';
89+
echo '<div>There was an error trying to fetch the speedtest result for ID "'.htmlspecialchars($_GET['id'], ENT_HTML5, 'UTF-8').'".</div>';
9090
} elseif (null === $speedtest) {
91-
echo '<div>Could not find a speedtest result for ID "'.$_GET['id'].'".</div>';
91+
echo '<div>Could not find a speedtest result for ID "'.htmlspecialchars($_GET['id'], ENT_HTML5, 'UTF-8').'".</div>';
9292
} else {
9393
$speedtests = [$speedtest];
9494
}

0 commit comments

Comments
 (0)