Skip to content

Commit

Permalink
no need for htmlspecialchars_decode(email) in handleFormSubmission
Browse files Browse the repository at this point in the history
  • Loading branch information
creme332 committed Apr 19, 2024
1 parent 536795b commit f9045be
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/controllers/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ private function validateUser(string $email, string $password): bool

private function handleFormSubmission(): void
{
// get un-sanitized version of email which may contain special characters
// Ref: https://blog.mutantmail.com/can-email-addresses-have-special-characters/
$entered_email = htmlspecialchars_decode(trim($_POST['email'] ?? ""));
$entered_email = trim($_POST['email'] ?? "");

// leave password unchanged as leading/trailing spaces can be part of password
// Ref: https://stackoverflow.com/a/7240898/17627866
Expand Down

0 comments on commit f9045be

Please sign in to comment.