摘要:
meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta http-equiv="Content-Language" content="zh-CN" /> <meta content="all" name="robots" /> <meta name="author" content="盛飞, SenFe" 阅读全文
2009年10月21日 #
摘要:
$ip = "1.1.1.255".chr(0)."haha"; if(ereg("^[0-9]{1,3}/.[0-9]{1,3}/.[0-9]{1,3}/.[0-9]{1,3}$",$ip)) { echo $ip; } else { echo "unknown"; } 这个ereg正则限制了$ip的数据为xxx.xxx.xxx.xxx这样的形式,表面上看上面的代码应该输出"unknown",而实际却输出了"1.1.1.255haha",因为ereg函数存在NULL截断漏洞 阅读全文