二七王:补全 FORBIDDEN 列表覆盖完整协议字段
FORBIDDEN 列表扩充到覆盖协议中服务端→客户端的全部字段名, 作为回归网防止未来在发包方法中意外泄漏服务端计算结果。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -43,8 +43,15 @@ t.eq('提示', call(() => EQW_Rpc.tishi(1)).data, { seat: 2, tip: 1 });
|
|||||||
t.eq('准备', call(() => EQW_Rpc.zhunbei()).data, { seat: 2 });
|
t.eq('准备', call(() => EQW_Rpc.zhunbei()).data, { seat: 2 });
|
||||||
|
|
||||||
// ---- 【核心】只带意图:所有发包的字段集合不含任何结论字段 ----
|
// ---- 【核心】只带意图:所有发包的字段集合不含任何结论字段 ----
|
||||||
|
// FORBIDDEN 列表:协议中服务端→客户端方向的字段名。原则上都不该出现在客户端→服务端的包里。
|
||||||
|
// 作为回归网:新增发包方法时若引入了服务端字段名会被它拦下。
|
||||||
const FORBIDDEN = ['score', 'isWin', 'phase', 'nextSeat', 'nextseat', 'handCards',
|
const FORBIDDEN = ['score', 'isWin', 'phase', 'nextSeat', 'nextseat', 'handCards',
|
||||||
'grade', 'multiple', 'result', 'banker', 'curmultiple', 'upgrade'];
|
'grade', 'multiple', 'result', 'banker', 'curmultiple', 'upgrade',
|
||||||
|
'cardsinhand', 'mustcard', 'seatlist', 'baozhu', 'liangpai', 'bottomcards', 'burycards',
|
||||||
|
'ancard3s', 'countdown', 'currcall', 'chongguan', 'wang', 'naward',
|
||||||
|
'grade_aw', 'grade_cg', 'grade_bw', 'grade_jf', 'account', 'readystate',
|
||||||
|
'shuai', 'shuaicuo', 'cardtype', 'maxseat', 'gradecards', 'others', 'zhucards',
|
||||||
|
'playproc', 'pushlist', 'touxiang'];
|
||||||
sent.length = 0;
|
sent.length = 0;
|
||||||
EQW_Rpc.jiaofen(60); EQW_Rpc.touxiang(); EQW_Rpc.xuanzhu(1);
|
EQW_Rpc.jiaofen(60); EQW_Rpc.touxiang(); EQW_Rpc.xuanzhu(1);
|
||||||
EQW_Rpc.maipai([1,2,3,4,5,6,7,8]); EQW_Rpc.chupai([9]);
|
EQW_Rpc.maipai([1,2,3,4,5,6,7,8]); EQW_Rpc.chupai([9]);
|
||||||
|
|||||||
Reference in New Issue
Block a user