user.php 740行
上面是修改密码的相关代码
这里需要三个参数$new_password,$user_id,$code
而$code是怎么生成的呢
看下面
user.php 696行
在上面可以看到
$code = md5($user_info['user_id'] . $_CFG['hash_code'] . $user_info['reg_time']);
若网站曾被拖过库这些信息早就泄露了 而 hash_code ,reg_time基本是不会变的
关键是这个code不会过期啊
若用户使用找回密码功能 而系统发送邮件 把
链接发送给用户
http://www.shop.com/user.php?act=get_password&uid=1324&code=3167b5411485e5e34daf22d034ae78bb
这个链接若被泄漏了
就相当于有把备用钥匙 随时都能重置用户密码
$code=md5($user_info['user_id'] . $_CFG['hash_code'] . $user_info['reg_time'])
'hash_code' => '316589*********',
验证
uname:zhangsan uid:1324 reg_time=1384847207
code=md5(1324316589*********1384847207)
code: 58c72b3ee37**5b798857f19b