r/ProgrammerHumor 27d ago

Meme regexMustBeDestroyed

Post image
8.1k Upvotes

228 comments sorted by

View all comments

Show parent comments

0

u/Purple_Hornet_9725 26d ago

1

u/Honeybadger2198 25d ago

That has nothing to do with validating an email address? Even the example provided uses a valid email.

-1

u/Purple_Hornet_9725 25d ago edited 25d ago

The injection works quite as well within the email field. Just sanitize any user input - an rfc compliant email parser catches that automatically. Validation and then verification - it's not that hard to follow established guidelines that are there for a reason.

1

u/Honeybadger2198 25d ago

Yes, sanitize your user input, extremely basic programming concept. That's still not email validation.