mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Fix some suggestions / ignore others
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
@@ -47,7 +47,7 @@ if ($_POST['action'] == 'delete_message' && isset($_POST['id'])) {
|
||||
$ids = json_decode($_POST['id']);
|
||||
if(!is_array($ids))
|
||||
throw new Exception('Invalid payload: id is not an array');
|
||||
// Explot prevention: Ensure all entries in the ID array are integers
|
||||
// Exploit prevention: Ensure all entries in the ID array are integers
|
||||
foreach($ids as $value) {
|
||||
if (!is_numeric($value))
|
||||
throw new Exception('Invalid payload: id contains non-numeric entries');
|
||||
|
||||
Reference in New Issue
Block a user