Commit c24c8cc
committed
fix(cli): add upper bound check for modelFacingUserTurnCount
Reject values exceeding Number.MAX_SAFE_INTEGER in both
validateModelFacingUserTurnCount (Session.ts) and the
isHistorySnapshot guard (acpAgent.ts). This prevents
malformed clients from poisoning session state with
absurdly large turn counts.1 parent 66ce9c3 commit c24c8cc
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1559 | 1559 | | |
1560 | 1560 | | |
1561 | 1561 | | |
1562 | | - | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
1563 | 1565 | | |
1564 | 1566 | | |
1565 | 1567 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
155 | 161 | | |
156 | 162 | | |
157 | 163 | | |
| |||
0 commit comments