Jump to content

Increasing max_input_vars limit


brianlange

Recommended Posts

By default max_input_vars is set to 1000 (5.3). This can cause issues if a form has more than a thousand input values or a post array has more than 1k elements.

Increasing the limit is said to be a security risk. Is the risk minimal? Can you raise the limit with minimal risk involved?

 

 

Link to comment
Share on other sites

Is the risk minimal? Can you raise the limit with minimal risk involved?

 

Increasing the limit mainly just means that a user can eat up more memory by posting a lot of data, but there are other directives to control this as well, such as max post size and memory limit.  I'd say the risk in increasing it is fairly minimal.

 

However, I'd also say if you have a page with 1k or more inputs, you might want to re-think the design and UI of that page as I'd guess there is most likely a better way to handle it.

 

Link to comment
Share on other sites

Is the risk minimal? Can you raise the limit with minimal risk involved?

 

Increasing the limit mainly just means that a user can eat up more memory by posting a lot of data, but there are other directives to control this as well, such as max post size and memory limit.  I'd say the risk in increasing it is fairly minimal.

 

However, I'd also say if you have a page with 1k or more inputs, you might want to re-think the design and UI of that page as I'd guess there is most likely a better way to handle it.

 

 

Completely agree, however, as Rasmus says in the video I posted, it's OK for X(1000 he says) requests, but get to Y(32,299) and PHP can take around 40 seconds to load the script.

 

 

I think DDOS'ing a server with simple HTTP requests for the offending page would be extremely easy.

Link to comment
Share on other sites

Thanks for the great responses.

The form accepts html and then parses the links that are entered into a new form. There are multiple individual checkboxes (not arrays) associated with each link so if there are a couple hundred links this leads to 1k+ plus form elements.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.