generated from root/miduo_server
天眼封禁
parent
09055f5035
commit
7d2f16600d
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue