Title:
isvalid("variableName") incorrectly validates strings with leading/trailing spaces or ending period
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): James Moberg / James Moberg (James Moberg)
Created: 09/12/2013
Components: Language
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final / 287432
Priority/Frequency: Major / All users will encounter
Locale/System: English / Win 2008 Server R2 64 bit
Vote Count: 1
Problem Description: isvalid("variableName") documentation indicates that it validates a string formatted according to the ColdFusion variable naming conventions. The variable naming convention indicates that it must begin with a letter, underscore, or Unicode currency symbol and not cannot contain spaces. You cannot use periods in simple variable names, with the exception of variables in the Cookie and Client scopes
http://help.adobe.com/en_US/ColdFusion/10.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7fd3.html
It appears that strings with leading or trailing spaces are incorrectly identified as valid variable names. (I pasted the code below into CFLive.net and Railo correctly identifies all strings as invalid variable names.)
Steps to Reproduce:
<cfoutput>
<cfloop list="abc., abc,abc , abc " index="this">
"#this#" = #isvalid("variableName", this)#<br>
</cfloop>
</cfoutput>
Actual Result: Strings with leading or trailing spaces are valid. Strings ending with a period are valid.
Expected Result: Any strings with any spaces should not be identified as valid variable names. Strings ending with a period should not be valid.
Any Workarounds: None.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3631104
Deployment Phase: Release Candidate
External Customer Info:
External Company:
External Customer Name: Jamo
External Customer Email:
External Test Config: My Hardware and Environment details:
ColdFusion 10,0,11,285380 (Dev)
Windows Server 2008 R2 (64bit)
Attachments:
Comments: