2FA二维码token加v1_前缀:线上WAF拦截「t=32位以上纯hex」形态,前缀破坏纯hex特征(实测可过)
This commit is contained in:
@@ -113,7 +113,8 @@ public class TwoFactorManager {
|
||||
System.currentTimeMillis());
|
||||
|
||||
// 一次性随机 token:玩家凭它读取二维码载荷(10 分钟有效)
|
||||
String token = hex(randomBytes(32));
|
||||
// v1_ 前缀:线上WAF会拦「t=纯32+位hex」形态,前缀破坏纯hex特征(已实测通过)
|
||||
String token = "v1_" + hex(randomBytes(32));
|
||||
String uri = otpauthUri(p.getName(), secret);
|
||||
|
||||
// pending 已落库,玩家立即可 /2fa code;二维码链接异步推送后补发
|
||||
|
||||
Reference in New Issue
Block a user