【 在 jiangjun@kyxk.net-SPAM.no (jiangjun) 的大作中提到: 】
: bbslogin.php中关于HTTP_X_FORWARDED_FOR是如下的
: @$fullfromhost=$_SERVER["HTTP_X_FORWARDED_FOR"];
服务器前端没有squid之类的话不要读X_FORWARDED_FOR,比方这里改成$fullfromhost=""
: if ($fullfromhost=="") {
: @$fullfromhost=$_SERVER["REMOTE_ADDR"];
: $fromhost=$fullfromhost;
: }
: else {
: $str = strrchr($fullfromhost, ",");
: if ($str!=FALSE)
: $fromhost=substr($str,1);
: else
: $fromhost=$fullfromhost;
: }
: if ($fromhost=="") {
: $fromhost="127.0.0.1";
: $fullfromhost="127.0.0.1";
: 怎样才能既保留这个过滤代理的功能,又避免出现unknown,甚至有人自己设定x_forwarded成127.0.0.1呢?
--
FROM 128.12.181.*