2011-12-22 57 views
7

我得到了很多了Suhosin的錯誤在我的/ 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.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 

所以我了Suhosin配置我該如何解決這個問題?我試圖提高上面的所有值,但它也沒有工作。

回答

16

我得到了同樣的錯誤。要修復它我編輯/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個字符。

2

你可以試試論文:

suhosin.get.max_name_length (default 64) 
suhosin.post.max_name_length (default 64) 
suhosin.request.max_varname_length (default 64)