为什么需要 PHP max_input_vars 设置?

为什么需要 PHP max_input_vars 设置?

我有一个有点奇怪的问题。为什么max_input_vars需要 PHP 设置?

PHP 有内存限制。因此,即使有人发送 10M 的变量,请求也会因为内存不足而被终止。

max_input_vars设置为1,000,000有什么风险?

谢谢

答案1

PHPmax_input_vars通过使用来自 GET 或 POST 请求的哈希碰撞来解决 DOS 攻击。

http://lukasmartinelli.ch/web/2014/11/17/php-dos-attack-revisited.html

这里可以找到一个很好的解释:https://events.ccc.de/congress/2011/Fahrplan/attachments/2007_28C3_Effective_DoS_on_web_application_platforms.pdf
该 PDF 也链接在上面的文章中。

相关内容