nus-cs2103-AY2122S2 / forum

14 stars 1 forks source link

Validity of an email #293

Open zunedz opened 2 years ago

zunedz commented 2 years ago

Hi, I reported a bug regarding an invalid email being accepted by the application (ex: kafka@com). The dev team says that it is not considered an invalid email as it adheres to html5 email validation. However, it is unlikely that it is a correct email given that it does not contain a .

Should I accept or reject it? Thank you

zhongfu commented 2 years ago

note that there are some TLDs that have MX records:

$ dig +short MX tt
10 ALT1.ASPMX.L.GOOGLE.COM.
1 ASPMX.L.GOOGLE.COM.

so technically, an email address like admin@tt is publicly routable, and would (and should, imo) be considered valid

are they likely to be email addresses used by a typical user? probably not, but it's still a valid email address that can receive emails, so I would tend towards thinking that rejecting such email addresses is more incorrect than not rejecting them