Re: [PHP-DEV] max_input_vars trigger detection

This is only part of a thread. view whole thread
  110106
May 10, 2020 13:02 david.proweb@gmail.com (David Rodrigues)
Maybe throw an exception by default when it happen. Considering
max_input_vars+1, when hit, throw.

Em dom, 10 de mai de 2020 09:34, Craig Duncan <php@duncanc.co.uk> escreveu:

> > > > Although not particularly elegant, and it does require you to reject > requests that hit but don't exceed the limit, I've used this approach > before: > > > $max = ini_get("max_input_vars") - 1; > $check = count($_REQUEST); > if ($check > $max) { > throw new RequestException("Request is too large, only {$max} input > variables are permitted"); > } >