From a2e8838ce398789ef8e72259c9d0eea2d3a73742 Mon Sep 17 00:00:00 2001 From: Bruno Date: Wed, 26 Jun 2024 23:37:57 -0300 Subject: [PATCH] Ajuste em FILTER_SANITIZE_STRING is deprecated --- controllers/login.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/controllers/login.php b/controllers/login.php index de06d94..2d23efd 100644 --- a/controllers/login.php +++ b/controllers/login.php @@ -73,10 +73,9 @@ function validateUser($login, $password) } if ($_SERVER['REQUEST_METHOD'] == 'POST') { - $login = filter_input(INPUT_POST, 'login', FILTER_SANITIZE_STRING); - $senha = filter_input(INPUT_POST, 'senha', FILTER_SANITIZE_STRING); + $login = htmlspecialchars(filter_input(INPUT_POST, 'login', FILTER_UNSAFE_RAW)); + $senha = htmlspecialchars(filter_input(INPUT_POST, 'senha', FILTER_UNSAFE_RAW)); $responseArray = validateUser($login, $senha); echo json_encode($responseArray); -} -?> \ No newline at end of file +} \ No newline at end of file