Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@d4ng3r0u5 Sure, but the problem was, when it was being compared to the user input, which contained valid email address, without the space, it wasn't matching.
-
JS96185077yHow did it happen?
Don't you check if an email address is valid and do a trim before inserting it in the DB? -
@JS96 We do now. :P
Actually this is some legacy shit, that was dumped on us just recently. There is a lot of other bullshit like this in there too. -
oh, that's nasty...
We had a similar problem once, but it was with email addresses that were saved, in an external DB we do not manage, with upper and lower cases and sometimes leading/trailing spaces.
Since then we always do "trim" and "lowercase"... -
Voxera115857y@JS96 also, valid for emails is not that easy once you go beyond the American alphabet.
Very few validatiors actually do a good job, and then you have some chars that depending on db collation might collide despite being separate ;). Like the german double s that are still used in some words but where the word can be written using either two s or the double s.
Problem is, sql server considers them the same for a unique constraint, but they are actually two different spellings.
And thats not the only one :/
Related Rants
-
cdrice105"You gave us bad code! We ran it and now production is DOWN! Join this bridgeline now and help us fix this!" ...
-
MoboTheHobo35My Friend: Dude our Linux Server is not working anymore! Me: What? What did you do? My friend: Nothing I swe...
-
tommy15Right now someone at Google is coding something useless for us to laugh at on April Fools.
Spent the entire day looking into a bug. The problem was a space in the email address, that was stored in the DB. FML
rant
fml
whatever