Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing more than 8000 Post parameters throws error

I am working on a module which requires to submit a form with an insane amount of parameters (8k-10k). I am not sure whether this is a good idea or not. But that's the way it is. I have changed the settings in neo-runtime.xml file as mentioned in this link as bellow:

<var name='postParametersLimit'><number>10000.0</number></var>

and restarted the server. But no use. CF still throws error 500. We can not see any robust information. I am working on CF9.0.2 and we are using IIS 7.5. Is there anything do i need to do?

like image 269
Tushar Bhaware Avatar asked Feb 11 '26 03:02

Tushar Bhaware


2 Answers

"We gave our client a dynamic form where he can add his own form fields and now we have this problem. There was a mismatch between clients expectations and our thinking of the way client wants it."

Unfortunately, you're going to have to tell the client they can't have it how they want it. That post processing limit is there for security reasons and if you raise it too high, then you're re-opening your server to a denial of service attack using a hash algorithm collision.

We have tens of thousands of forms in our workflow system and work with banking and government clients. Once this update was applied (in development first), we had to raise the default to a certain value and stick with it. We made sure to note this limitation to the entire business team and add it to our coding standards document to ensure that all new development was done in accordance to the standard. After reworking a handful of existing forms to account for the limitation, we were able to push the security update to production without a problem.

Just tell them that there is a security restriction on the number of fields in a single form and they cannot cross that line. If you need to gather that much data, they'll have to break it up into multiple forms.

like image 78
Adrian J. Moreno Avatar answered Feb 14 '26 05:02

Adrian J. Moreno


You can use a cfgrid instead of using a long form with huge amount of data to take input from the user. cfgrid allows you to load only a limited amount of data from the database. Using it you can prevent posting and loading of huge amount of data at once.

And if you are not a great supporter of cfgrid of cfajax features you can still use pagination or stuff like that, that will allow you to load a limited amount of data in your form and in turn less posting of data. But the later will need you to build a logic by yourself.

like image 21
Pankaj Avatar answered Feb 14 '26 07:02

Pankaj



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!