brady
brady
4423 4 0

重要更新:Youbbs发现SQL注入漏洞

存在问题的版本:
v1.04,v2.0

v1.04把:

$cur_user = null;
$cur_uid = $_COOKIE['cur_uid'];
$cur_uname = $_COOKIE['cur_uname'];
$cur_ucode = $_COOKIE['cur_ucode'];

替换为:

$cur_user = null;
$cur_uid = isset($_COOKIE['cur_uid']) ? intval($_COOKIE['cur_uid']) : '';
$cur_uname = isset($_COOKIE['cur_uname']) ? $_COOKIE['cur_uname'] : '';
$cur_ucode = isset($_COOKIE['cur_ucode']) ? $_COOKIE['cur_ucode'] : '';

v2.0把:

$cur_user = null;
$cur_uid = isset($_COOKIE['cur_uid']) ? $_COOKIE['cur_uid'] : '';
$cur_uname = isset($_COOKIE['cur_uname']) ? $_COOKIE['cur_uname'] : '';
$cur_ucode = isset($_COOKIE['cur_ucode']) ? $_COOKIE['cur_ucode'] : '';

替换为:

$cur_user = null;
$cur_uid = isset($_COOKIE['cur_uid']) ? intval($_COOKIE['cur_uid']) : '';
$cur_uname = isset($_COOKIE['cur_uname']) ? $_COOKIE['cur_uname'] : '';
$cur_ucode = isset($_COOKIE['cur_ucode']) ? $_COOKIE['cur_ucode'] : '';

漏洞截图:

0

See Also

Nearby


Discussion (4)

lcys
lcys 2015-07-10 15:06

修复就好

0
lincanbin
lincanbin 2015-07-14 17:40

mysql是PHP中早就预弃用的extension了,再不济也该用Mysqli,跟Python的MySQLdb长得挺像,虽然难看好歹也支持预处理。
最推荐的是PDO。

0
dfak
dfak 2015-12-15 10:41

楼主,这个具体怎么操作??

不懂,求具体操作法。。

谢谢

@admin

0
youbbs
youbbs 2015-12-15 15:22

@dfak 使用最新版

0
Login Topics