Bug #1909
closed
Confirmed, issue is with the REGEX used to validate emails in the function cbIsValidEmail. It is a case sensitive REGEX.
FROM:
/[a-z0-9!#$%&'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+\\/=?^_`{|}~-]+)*
(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/@
TO: (case non-sensitive flag added)
/[a-z0-9!#$%&'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+\\/=?^_`{|}~-]+)*
(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i@
TO: (capitals added)
/[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+)*
(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/@
Also, there appears to be double escaping on periods, am not sure why so did not remove but double escaping a period is invalid as you're escaping the escape.
I believe the double escaping is due to stripslashes being applied to the regex. This would cause it to require double escaping.
added case insensitive flag
- Status changed from New to Resolved
- Target version set to CB 1.3
- Status changed from Resolved to Closed
- % Done changed from 80 to 100
- Estimated time set to 0:12 h
Patch committed in r1249 .
The double escaping of \ is to have a correctly escaped PHP string.... "\\" gives a single \ ;-)
Thank you Kyle.
Also available in: Atom
PDF