Skip to content

Email validations in MagicLinkController::LoginAction? What's the point? #900

Answered by kenjis
IvanNavarroSommerz asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, the e-mail address validation rules are the same.

Normal users send their registered email address. However, there is a possibility that they may make a typo and send a strange string.

More importantly, an attacker can send any data. Binary data can also be sent.
Processing data that is not expected by developers may result in security bugs.
And there might be bugs in PHP.
So it is safe to detect invalid data as early as possible and avoid processing it.

In this case, there is no need to process anything that is formally invalid as an e-mail address.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@IvanNavarroSommerz
Comment options

@kenjis
Comment options

Answer selected by IvanNavarroSommerz
@IvanNavarroSommerz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants