一种重要的药物正被苏麻素过滤。当以下内容不起作用时,如何覆盖suhosin?
public_html/php.ini :
[suhosin]
suhosin.get.max_value_length = 2048除其他外,将suhosin.get.max_value_length设置为空和崩溃用户会话。
-
public_html/..htaccess :
<IfModule mod_php5.c>
php_value suhosin.get.max_value_length 2048
</IfModule>无效
-
(系统默认设置为:)
suhosin.get.max_value_length = 512
suhosin.get.max_value_length = 100000被过滤的GET参数长为576个字符。
发布于 2012-10-04 00:35:36
我们可以通过重建$_GET来绕过苏福林
// Override suhosin $_GET limitation
$_GET = array();
$params = explode('&', $_SERVER['QUERY_STRING']);
foreach ($params as $pair) {
list($key, $value) = explode('=', $pair);
$_GET[urldecode($key)] = urldecode($value);
}发布于 2014-02-13 11:48:10
在Debian\Ubuntu系统上,您可以全局设置suhosin参数:
/etc/php5/conf.d/suhosin.ini发布于 2021-01-01 01:38:35
还有一个更短的解决方案:
// Rebuild GET variables
parse_str($_SERVER['QUERY_STRING'], $_GET);https://stackoverflow.com/questions/12718609
复制相似问题