tracker issue : CF-4170204

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

'serverSideFormValidation = false' stops validation errors, but does not stop omission of fieldnames

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Gary Stanton / Gary Stanton (Gary Stanton)

Created: 07/01/2016

Components: CFForm, HTML

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Win 2008 Server

Vote Count: 0

Listed in the version 2016.0.03.300466 Issues Fixed doc
Problem Description:
In CF9, a flag was added to disable the legacy 'hidden fields form validation' that occurrs on form fields in the format: xxx_datatype.
Without this flag, submitted forms with names that clash with the reserved validation datatypes can cause ambiguous errors.

Setting the 'serverSideFormValidation' flag to false in Application.cfc stops these errors occurring, but it seems that another consequence of the form validation is that the form fields in question are omitted from from the 'fieldnames' variable. If I'm explicitly setting a flag to stop the bahaviour of this feature, I'd expect that to include all aspects of that behaviour.

Steps to Reproduce:
1) Include the following in your Application.cfc:
THIS.serverSideFormValidation = false;

2) Submit a form with a fieldname of 'foo_bar_required'.

Actual Result:
'foo_bar_required' is omitted from the 'fieldnames' variable.

Expected Result:
'foo_bar_required' is included in the fieldnames variable.

Any Workarounds:
This only causes problems when underscores and reserved words are used in form fieldnames. Changing the fieldname will resolve the issue, however there *are* occasions when this is not possible.

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

Watson Bug ID:	4170204

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

Tested on CF10 Update 17.

I'm unsure as to whether this occurrs on newer versions, but I've found no bug report on this issue, so I assume it does.



In which update will I find this fixed?
Comment by External U.
2246 | August 24, 2016 11:32:53 AM GMT
planned to go out with the next update for CF2016.
Comment by Piyush K.
2247 | October 03, 2016 08:42:34 AM GMT
What about CF10 and CF11?
Comment by External U.
2248 | October 03, 2016 08:44:11 AM GMT
I don't believe that this was ever fixed in anything other than CF2016. (Not sure why.) As a workaround, I tested overwriting Form.Fieldnames as ListSort(StructKeyList(Form), "textnocase") if it doesn't match (or have length) and it works.
Comment by James M.
2249 | February 21, 2018 01:37:20 AM GMT