天眼封禁

master
mengchengzhen 2021-05-27 14:39:27 +08:00
parent 09055f5035
commit 7d2f16600d
1 changed files with 3 additions and 3 deletions

View File

@ -182,7 +182,7 @@ public class GameTitleController {
Map<String,String> map = new HashMap<>();
map.put("code","1");
map.put("message","");
if(verify(request)){
if(verify(request,map)){
return JSON.toJSONString(map);
}
try {
@ -200,7 +200,7 @@ public class GameTitleController {
}
}
private boolean verify(HttpServletRequest request)
private boolean verify(HttpServletRequest request,Map<String,String> map)
{
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
String playerId = parameterMap.get("playerId");
@ -219,7 +219,7 @@ public class GameTitleController {
byte[] md5sum = digest.digest();
BigInteger bigInt = new BigInteger(1, md5sum);
map.put("message","sign:"+sign+" newSign:"+String.format("%032X", bigInt));
return String.format("%032X", bigInt).equalsIgnoreCase(sign); // MD5前面会补零
} catch (NoSuchAlgorithmException | UnsupportedEncodingException e)