mirror of
https://github.com/pi-hole/web.git
synced 2026-04-23 18:29:43 +01:00
Prevent arbritary js code from beign returned from the database
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
@@ -510,6 +510,9 @@ if ($_POST['action'] == 'get_groups') {
|
||||
$res['domain'] = $utf8_domain.' ('.$res['domain'].')';
|
||||
}
|
||||
}
|
||||
// Prevent domain and comment fields from returning any arbitary javascript code which could be executed on the browser.
|
||||
$res['domain'] = htmlentities($res['domain']);
|
||||
$res['comment'] = htmlentities($res['comment']);
|
||||
array_push($data, $res);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user