Bug #1909
closedCapital letters in email field not allowed
Description
As described here: http://www.joomlapolis.com/component/option,com_joomlaboard/Itemid,38/func,view/id,130434/catid,112/limit,6/limitstart,6/
and verified by me on my local test site.
Files
Updated by krileon over 14 years ago
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.
Updated by krileon over 14 years ago
- Assignee set to beat
I believe the double escaping is due to stripslashes being applied to the regex. This would cause it to require double escaping.
Updated by krileon over 14 years ago
- File 1909.patch 1909.patch added
- % Done changed from 0 to 80
added case insensitive flag
Updated by beat about 14 years ago
- 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.