登录重放攻击预防
https://blog.csdn.net/u014538198/article/details/41596617
前端:
var salt == 很长的常量字符串
password_salt_username_md5 = md5(password + salt + username)
var random_id = sendHttpRequest_getRandomId(username);
var password_salt_username_md5_hash = md5(password_salt_username_md5 + random_id) ====> 发给服务端
服务端:
1.校验:
var password_salt_username_md5 = 根据用户名查询出
md5(password_salt_username_md5 + random_id)
2.密码存储
password_salt_username_md5