ColdFusion 10.0  -  Bug 3725691

Created on Tuesday, March 18, 2014

Login for more options


isValid() accepts email addresses with leading / trailing whitespace.


isValid( "email" ) will return True for email addresses that have leading and or trailing whitespace.


Test Configuration

App Language(s) English
OS Language(s) English
Platform(s) Mac 10 All

Notes (4)

  • Adam Cameron

    5:22:22 AM GMT+00:00 May 16, 2015

    Agreed. It's a bug. Fix it.

    Rupesh's assertion of "However, Java Mail API and cfmail automatically trims the mail address" is specious because the function is not isValid("emailForJavaMail"), it's isValid("email"). And an email with leading and trailing space is invalid. Ergo: isValid("email") should fail it.

    Rupesh's second assertion that somehow a fictitious group of ppl might have specifically written code which relies on a clear bug, and that their situation should somehow trump the situations of *everyone else* using the function expecting it to work as intended stretches way beyond "specious" and into the realms of "that simply wasn't worth thinking about, much less taking the time to write down".

    Everyone agrees this is a bug. The rationales provided to mitigate it and be concerned about backwards compat are basically invalid.

    It ought to be fixed.

    It's pretty poor form from Adobe that the reaction to this bug wasn't simply "yeah, we'll fix it", and then just fix it.

  • Carl Von Stetten

    8:37:44 AM GMT+00:00 May 15, 2015

    Who were you expecting a response from? Rupesh was pretty clear that this was a valid bug. The only question was whether or not fixing the bug would break existing applications that for some reason depended on the incorrect behavior of isValid() (which is probably unlikely). Since no one responded, the bug should be fixed rather than closed as "NotABug".

  • Suchika Singh

    2:40:07 AM GMT+00:00 May 14, 2015

    No response from the code and so closing the bug.

  • Rupesh Kumar

    10:19:18 PM GMT+00:00 Nov 2, 2014

    As per the RFC for email address, there should not be any space, unless escaped. So considering the RFC, this should be fixed.

    However, Java Mail API and cfmail automatically trims the mail address before using it and therefore any leading/trailing space would not cause any error there. There might be some code which is relying on this incorrect behavior of isValid and they would need to be changed. Do you see any concern?

Duplicate ID
Reported By Ben Nadel


State Closed
Status Withdrawn
Reason NotABug


Priority 2-Medium
Frequency All users will encounter
Failure Type Incorrectly Functioning
Product Area Core Runtime


Found In Build Final
Fixed In Build

Attachments (0)

No Files Attached

Votes (2)

  • John Sieber

    10:59:57 AM GMT+00:00 Mar 26, 2014

    Forces us to use trim before using the isValid method. Should not be necessary.

  • Adam Cameron

    6:24:15 AM GMT+00:00 Mar 18, 2014

    +1 / [subscribe]


Your session has expired! Click to login
Current form data will be preserved