Validation Issue With validateEmail (/src/main/java/resource/context/form.cfm)


#1

I’ve noticed what I believe is an issue with the validation of email that is done in https://github.com/lucee/Lucee/blob/master/core/src/main/java/resource/context/form.cfm#L510

The regex being used to validate the email address assumes that the email address will be in lowercase. This was noticed while debugging a form on a mobile device where the first letter in input fields is always upper-cased.

I’ve put in a workaround for this by changing the input to lower-case on blur, but was curious on thoughts of modifying the basecode in the above link to allow validate where upper-case is used.

Proposed solution would be to replace instances of [a-z] with [A-Za-z]

Regards,
Greg


#2

Hi @gdog,

I’ve tested this, it’s confirmed the issue happened. So, please rise ticket for this issue on Jira (https://luceeserver.atlassian.net/). I’ll fix it soon.


#3

Thanks @cfmitrah,

JIRA issue LDEV-1613 has been created.

~Greg