4 ms·
I would filter out at least whitespaces and comma. Aside from catching typos this also protects against header injection or spam abusenby sending to multiple re
by johannes1234321 4y ago
I would filter out at least whitespaces and comma. Aside from catching typos this also protects against header injection or spam abusenby sending to multiple recipients.
And yes, those should be defended when constructing the mail, but checking early doesn't cost much.
- gnabgib 4y agoWhite space and comma are allowed in the local part (left of @), as long as it's surrounded by quotes [https://en.wikipedia.org/wiki/Email_address#Local-part https://en.wikipedia.org/wiki/Email_address#Local-part] [https://www.rfc-editor.org/rfc/rfc5322#section-3.2.4 https://www.rfc-editor.org/rfc/rfc5322#section-3.2.4]
- kentonv 4y agoHas anyone ever seen a quoted local part though? Honest question! I'd love to hear the details of any specific case where one has ever been used.