tracker issue : CF-3520983

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

validateparams throws regex parse error when regex contains comma

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): David Polehonski / David Polehonski (Dpolehonski)

Created: 03/15/2013

Components: Language, CF Component

Versions: 9.0.1

Failure Type: Crash

Found In Build/Fixed In Build: 9.0.1 / CF11 Update5

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Windows 7

Vote Count: 1

Listed in the version 11.0.05.293506 Issues Fixed doc
validateparams throws regex parse error when regex contains comma.

Define a component with a property and required a regex validation. 
Confirm regex works without containing a comma, then add comma and error is thrown and page crashes.

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

Watson Bug ID:	3520983

External Customer Info:
External Company:  
External Customer Name: Dpolehonski
External Customer Email:  
External Test Config: My Hardware and Environment details: Windows 7 / IIS / ACF 9.0.1

Attachments:

Comments:

You're really gotta fix this sort of thing. I dunno how you can think it's still OK to have it in the system too full releases later. -- Adam
Vote by External U.
15989 | February 14, 2014 01:27:18 PM GMT
The fix for this bug is available in the pre-release build of ColdFusion 11 Update 5
Comment by CFwatson U.
15986 | February 20, 2015 09:22:53 AM GMT
This is not fixed in CF11 Update 5 (nor in build 11.0.0.294632). The following still throws "Error while parsing the validateparam" (unless the comma is removed from both validateparams): MyCFC.cfc --------- component accessors="true" { property name="myProperty1" validate="regex" validateparams="{pattern=[!@,]}"; property name="myProperty2" validate="regex" validateparams="{pattern=[!]{1,}}"; function init() { setMyProperty1("!"); setMyProperty2("!"); } } index.cfm --------- <cfscript> o = new MyCFC(); writeOutput(o.getMyProperty1()); writeOutput(o.getMyProperty2()); </cfscript> Can this ticket please be re-opened and fixed? Thanks!, -Aaron
Comment by External U.
15987 | August 14, 2015 03:21:37 PM GMT
Regarding my last comment, Adobe replied on #CF-4044095: ---------------------- If a pattern consists of a comma(,) then the pattern should be enclosed in quotes. Like for example in the above example, 1) validateparams="{pattern= '[!@,]' }" 2) validateparams="{pattern= '[!]{1,}' }" ---------------------- That was undocumented, but is documented now at https://wikidocs.adobe.com/wiki/display/coldfusionen/Functions Thanks!, -Aaron
Comment by External U.
15988 | September 21, 2015 06:40:35 PM GMT