加密:修复校验接口不通过问题
This commit is contained in:
@@ -278,7 +278,7 @@ class Filter {
|
||||
|
||||
private checkTimeStamp(msg: { ts: number }) {
|
||||
let ts = msg.ts;
|
||||
let result = isNumber(ts) && Date.now() - ts < gameData.serverConst.TIME_STAMP_OVER && Date.now() > ts;
|
||||
let result = isNumber(ts) && Date.now() - ts <= gameData.serverConst.TIME_STAMP_OVER && ts - Date.now() <= gameData.serverConst.TIME_STAMP_OVER;
|
||||
delete msg.ts;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -556,9 +556,9 @@ export function checkRouteParam(route: string, msg: any) {
|
||||
}
|
||||
case "battle.normalBattleHandler.battleEnd":
|
||||
{
|
||||
let { battleCode, battleId, isSuccess, heroes, star, stars, activityId = 0, pageIndex = 0 } = msg;
|
||||
let { battleCode, battleId, isSuccess, heroes, stars, activityId = 0, pageIndex = 0 } = msg;
|
||||
if(!checkNaturalStrings(battleCode)) return false;
|
||||
if(!checkNaturalNumbers(battleId, star, activityId, pageIndex)) return false;
|
||||
if(!checkNaturalNumbers(battleId, activityId, pageIndex)) return false;
|
||||
if(!checkBoolean(isSuccess)) return false;
|
||||
if(!checkNumberArray(heroes, stars)) return false;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user