The regexes at line 152 and 153 in geo_filter.module are set to work case insensitive. That's why the part checking for the top level domain (TLD) is working even if it is missing a dash:

([A-Za z]{2,4})

Must be:

([A-Za-z]{2,4})

BTW: You can simplify the regex by removing upper case selectors when using the case insensitive switch:

([a-z0-9._%-]+)\@([a-z0-9._%-]+)\.([a-z]{2,4})

Comments

JamesK’s picture

Status: Active » Fixed

Thanks. Committed to 6.x-1.x-dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.