Merge pull request #144 from CLAlberto/master

fix(read.php): replace deprecated FILTER_SANITIZE_STRING for PHP 8.3 …
This commit is contained in:
Giandonato Inverso
2025-05-08 08:56:07 +02:00
committed by GitHub
+3 -2
View File
@@ -5,8 +5,9 @@ if ($_SERVER["REQUEST_METHOD"] !== "GET" || !isset($_GET['id'])) {
die("Method not allowed. Check id parameter");
}
// Validation and sanitization of the input
$id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING);
// Validation and sanitization of the input UPDATE to php 8.3
$id = filter_input(INPUT_GET, 'id', FILTER_UNSAFE_RAW);
$id = trim(strip_tags($id));
if (!$id) {
die("Invalid ID parameter");