加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – suhosin中的大量请求变量名长度错误

发布时间:2020-12-13 13:38:10 所属栏目:PHP教程 来源:网络整理
导读:我的/ var / log / messages中有很多suhosin错误 Dec 22 06:28:12 server suhosin[4637]: ALERT - configured request variable name length limit exceeded - dropped variable '66583-((-....-..................-....-__-......-................-......-
我的/ var / log / messages中有很多suhosin错误
Dec 22 06:28:12 server suhosin[4637]: ALERT - configured request variable name length limit exceeded - dropped variable '66583-((-....-..................-....-__-......-................-......-............-........-......-__-))' (attacker '127.0.0.1',file '/home/user/public_html/vb/showthread.php')
Dec 22 06:28:14 server suhosin[4620]: ALERT - configured request variable name length limit exceeded - dropped variable '125055-........-..............-............-Zombie-Driftwood-2010-DVDrip-..........-............-......-18-............-......-........-............' (attacker '127.0.0.1',file '/home/user/public_html/vb/showthread.php')

这是我在php.ini文件中的suhosin配置

[suhosin]
suhosin.cookie.encrypt = Off
suhosin.request.max_vars = 10000
suhosin.request.max_value_length = 65000
suhosin.post.max_vars = 10000
suhosin.post.max_value_length = 5000
suhosin.get.max_vars = 10000
suhosin.get.max_value_length = 10000
suhosin.memory_limit = 128M

那么我该如何解决这个问题呢?我试图提高上面的所有值,但它也不起作用.

我得到了同样的错误.要修复它,我编辑了/etc/php.d/suhosin.ini.首先,我改变了
suhosin.request.max_varname_length = 64

suhosin.request.max_varname_length = 128

但这并没有解决它,它只是巧妙地改变了错误信息(注意关于GET而不是请求的投诉):

Feb 22 17:07:04 <servern name> suhosin[23389]: ALERT - configured GET variable name length limit exceeded - dropped variable '/mehul_bakrania/feedback/personal_coach_and_peak_performance_trai/159296' (attacker '<ip address>',file <file path>')

所以我改变了:

suhosin.get.max_name_length = 64

suhosin.get.max_name_length = 128

然后我的问题得到解决.我选择128因为我注意到导致问题的URL长约70个字符.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读