Re: [PHP-DEV] max_input_vars trigger detection

2020-05-13 Thread Côme Chilliet
Le Sun, 10 May 2020 13:34:12 +0100, Craig Duncan a écrit : > 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 ($che

Re: [PHP-DEV] max_input_vars trigger detection

2020-05-10 Thread 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 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 a

Re: [PHP-DEV] max_input_vars trigger detection

2020-05-10 Thread Craig Duncan
> > 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

[PHP-DEV] max_input_vars trigger detection

2020-05-07 Thread Côme Chilliet
Hello, We’ve hit the max_input_vars limit some time ago, and at first I tried to detect this case, but I failed as there is no handy way to detect this situation. In our case the application was complaining about CSRF token missing since the token was truncated, and you had to go see the logs t