Skip to content

Commit

Permalink
Ajuste em FILTER_SANITIZE_STRING is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
ramosbrp committed Jun 27, 2024
1 parent e883884 commit a2e8838
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions controllers/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
?>
}

0 comments on commit a2e8838

Please sign in to comment.