mirror of
https://github.com/pi-hole/web.git
synced 2026-04-27 12:15:00 +01:00
@@ -45,9 +45,9 @@ function JSON_error($message = null)
|
||||
// Delete message identified by IDs
|
||||
if ($_POST['action'] == 'delete_message' && isset($_POST['id'])) {
|
||||
try {
|
||||
if(!is_array($_POST['id']))
|
||||
throw new Exception('Invalid payload: id is not an array');
|
||||
$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
|
||||
foreach($ids as $value) {
|
||||
if (!is_numeric($value))
|
||||
|
||||
Reference in New Issue
Block a user