Checking if email is valid

D'Arcy Cain darcy at VybeNetworks.com
Sun Nov 5 20:22:49 EST 2023


On 2023-11-05 06:48, Jon Ribbens via Python-list wrote:
> Sometimes I think that these sorts of stupid, wrong, validation are the
> fault of idiot managers. When it's apostrophes though I'm suspicious
> that it may be idiot programmers who don't know how to prevent SQL
> injection attacks without just saying "ban all apostrophes everywhere".
> Or perhaps it's idiot "security consultancies" who make it a tick-box
> requirement.

https://xkcd.com/327/

>> OK, now that I am started, what else?  Oh yah.  Look at your credit
>> card.  The number has spaces in it.  Why do I have to remove them.  If
>> you don't like them then you are a computer, just remove them.
> 
> Yes, this is also very stupid and annoying. Does nobody who works for
> the companies making these sorts of websites ever use their own, or
> indeed anyone else's, website?

Gotta wonder for sure.  It could also be the case of programmers 
depending on user input but the users insist on living with the bugs 
and/or working around them.  We made crash reporting dead simple to 
report on and still users didn't bother.  We would get the traceback and 
have to guess what the user was doing.

> Honestly I don't understand why every web application platform doesn't
> automatically strip all leading and trailing whitespace on user input
> by default. It's surely incredibly rare that it's sensible to preserve
> it. (I see Django eventually got around to this in version 1.9.)

Yes, I have done that forever.  Never had a complaint about it dropping 
characters.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:darcy at Vex.Net VoIP: sip:darcy at VybeNetworks.com



More information about the Python-list mailing list