Merge pull request #144 from CLAlberto/master
fix(read.php): replace deprecated FILTER_SANITIZE_STRING for PHP 8.3 …
This commit is contained in:
+3
-2
@@ -5,8 +5,9 @@ if ($_SERVER["REQUEST_METHOD"] !== "GET" || !isset($_GET['id'])) {
|
|||||||
die("Method not allowed. Check id parameter");
|
die("Method not allowed. Check id parameter");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validation and sanitization of the input
|
// Validation and sanitization of the input UPDATE to php 8.3
|
||||||
$id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING);
|
$id = filter_input(INPUT_GET, 'id', FILTER_UNSAFE_RAW);
|
||||||
|
$id = trim(strip_tags($id));
|
||||||
|
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
die("Invalid ID parameter");
|
die("Invalid ID parameter");
|
||||||
|
|||||||
Reference in New Issue
Block a user