Create account email address check should be case-insensitive

(Dave McClure) #1

to reproduce:

  1. sign up as
  2. sign up on same forum as JOE@EXAMPLE.COM
    expected: "sorry, that email has already been taken"
    actual: new account is created

Posting via e-mail in feature - E-mail address is case sensitive
(Jeff Atwood) #2

Not actually a bug – mail addresses (but not domains) are case sensitive, per Wikipedia:

(Dave McClure) #3

Odd. As mentioned on that article, I have always seen go to the same inbox as

So I guess while its not technically a bug, it can be problematic.

I brought this up because a new user on our forum was having trouble signing in after they were approved - and now I see they just tried to sign up again with the other case as a different user name.

(eriko) #4

It is due to the Robustness principle Otherwise know as Postel’s law that it works when you do that. It spread from TCP to SMTP.
From the writeup:

“TCP implementations should follow a general principle of robustness: be conservative in what you do, be liberal in what you accept from others.”

(Sam Saffron) #5

Personally, I think people should have to tick a very special site setting if they don’t want to be treated exactly the same as

(Jeff Atwood) #6

I am definitely coming around to this way of thinking.

(Joe Taber) #7

According to your link

The domain part is not case-sensitive, but local-parts may be.

So is strictly equivalent to bob@EXAMPLE.COM but may be different from If you really wanted case-sensitive emails you’d have to parse out the case-insensitive domain portion and compare it separately from the local parts.

According to a comment in this StackOverflow answer (emphasis mine):

‘In short, you are safe to treat email addresses as case-insensitive.’ I’d phrase it stronger: “you’re unsafe to treat email-addresses as case-sensitive manner” Especially when checking for duplicates in user-databases, etc.

Several email systems that are case-insensitive and that would cause problems if they were treated case-sensitively:

(Jeff Atwood) #8

@neil is working on this next week.

(Neil Lalonde) #9

This problem is fixed. Email is not case sensitive anymore!

(Jeff Atwood) #10