Skip to content

Commit

Permalink
Fixed minor vulnerability in stats.php
Browse files Browse the repository at this point in the history
  • Loading branch information
adolfintel committed Jan 3, 2022
1 parent 4234f5f commit a85f2c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions results/stats.php
Expand Up @@ -86,9 +86,9 @@
$speedtest = getSpeedtestUserById($_GET['id']);
$speedtests = [];
if (false === $speedtest) {
echo '<div>There was an error trying to fetch the speedtest result for ID "'.$_GET['id'].'".</div>';
echo '<div>There was an error trying to fetch the speedtest result for ID "'.htmlspecialchars($_GET['id'], ENT_HTML5, 'UTF-8').'".</div>';
} elseif (null === $speedtest) {
echo '<div>Could not find a speedtest result for ID "'.$_GET['id'].'".</div>';
echo '<div>Could not find a speedtest result for ID "'.htmlspecialchars($_GET['id'], ENT_HTML5, 'UTF-8').'".</div>';
} else {
$speedtests = [$speedtest];
}
Expand Down

0 comments on commit a85f2c0

Please sign in to comment.