Details
Assignee
Michael OffnerMichael OffnerReporter
Zac SpitzerZac SpitzerPriority
MinorLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Zac Spitzer
Zac SpitzerPriority
Labels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 7 October 2020 at 13:52
Updated 29 September 2022 at 16:04
Wikipedia has a list of sample email addresses
https://en.wikipedia.org/wiki/Email_address#Local-part
https://trycf.com/gist/7b8590667278453962df9783ccfc5abb/lucee5?theme=monokai
Lucee returns wrong results,
with quoted strings / double dots,
when the local part (before the @) exceeds 64 characters
valid examples simple@example.com very.common@example.com disposable.style.email.with+symbol@example.com other.email-with-hyphen@example.com fully-qualified-domain@example.com user.name+tag+sorting@example.com x@example.com example-indeed@strange-example.com admin@mailserver1 FAIL example@s.example " "@example.org "john..doe"@example.org FAIL mailhost!username@example.org user%example.com@example.org invalid examples Abc.example.com FAIL A@b@c@example.com FAIL a"b(c)d,e:f;gi[j\k]l@example.com FAIL just"not"right@example.com this is"not\allowed@example.com FAIL this\ still\"not\\allowed@example.com FAIL 1234567890123456789012345678901234567890123456789012345678901234+x@example.com i_like_underscore@but_its_not_allow_in_this_part.example.com FAIL
<cfscript> function checkExamples(examples){ loop list="#examples#" item="email" delimiters="#chr(10)##chr(13)#"{ ok = isValid("email", email) if (ok) echo ("#email#<br>"); else echo ("<b>#email# FAIL</b><br>"); } echo("<hr>"); } </cfscript> <!--- examples from from https://en.wikipedia.org/wiki/Email_address#Local-part ---> <cfsavecontent variable="valid_examples"> simple@example.com very.common@example.com disposable.style.email.with+symbol@example.com other.email-with-hyphen@example.com fully-qualified-domain@example.com user.name+tag+sorting@example.com x@example.com example-indeed@strange-example.com admin@mailserver1 example@s.example " "@example.org "john..doe"@example.org mailhost!username@example.org user%example.com@example.org </cfsavecontent> <cfsavecontent variable="invalid_examples"> Abc.example.com A@b@c@example.com a"b(c)d,e:f;g<h>i[j\k]l@example.com just"not"right@example.com this is"not\allowed@example.com this\ still\"not\\allowed@example.com 1234567890123456789012345678901234567890123456789012345678901234+x@example.com i_like_underscore@but_its_not_allow_in_this_part.example.com </cfsavecontent> <h1>valid examples</h1> <cfscript> checkExamples(valid_examples); </cfscript> <h1>invalid examples</h1> <cfscript> checkExamples(invalid_examples); </cfscript>