tracker issue : CF-3944176

select a category, or use search below
(searches all categories and all time range)

isValid() email does not accept unicode characters

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Jake Munson / Jake Munson (Jake Munson)

Created: 02/23/2015

Components: Language

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Win 2008 Server R2

Vote Count: 1

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on August 24, 2019 using build 2016.0.01.298513
Problem Description: If you try to validate email addresses using the isValid() ColdFusion function, and you pass in a valid address using unicode characters, isValid returns false.

Steps to Reproduce:
Run the following code in ColdFusion 11-

Actual Result: Returns "NO"

Expected Result: Returns "YES"

Any Workarounds:
Don't use isValid, use a different validation routine with a regex that allows unicode characters.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3944176

External Customer Info:
External Company:  
External Customer Name: Jake
External Customer Email:  
External Test Config: My Hardware and Environment details:

Server Product	ColdFusion

Version	11,0,04,293328

Edition	Enterprise  

Operating System	Windows Server 2008 R2  

OS Version	6.1  

Update Level	/D:/ColdFusion11/cfusion/lib/updates/chf11000004.jar  

Adobe Driver Version	5.1.3 (Build 000094)



IN HTML land the answer seems to be converting the address to punycode first: That could be an answer here. HTML5 ( which follows uses the following regex: /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/ So this method works pretty well in most cases: function isValidEmail(email) { return refindnocase('^[a-zA-Z0-9.!##$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$',email); } However, this pattern doesn't match the address you supplied. Likewise, Chrome's 'type=email' considers it invalid. Converting the address to punycode first would alleviate that. Of note:
Comment by External U.
8327 | February 23, 2015 01:49:51 PM GMT
[subscribe] (Vote must be between 25 and 4000 characters)
Vote by External U.
8330 | February 23, 2015 06:25:35 PM GMT
I just want to clarify that üñîçøðé IS a valid email address. I don't think that Marques was trying to say that it's not, but I can see how some might interpret his comment that way.
Comment by External U.
8328 | March 03, 2015 09:43:33 AM GMT
Fix tested on build, 295680 Test case added, coretests\coldfusion\functions\decision\isvalid\CF-3944176.cfm
Comment by Immanuel N.
8329 | September 23, 2015 05:31:38 AM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). Thanks!, -Aaron
Comment by Aaron N.
31184 | August 24, 2019 09:22:18 AM GMT