You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On main at b938790, prototype/gate_store.py has four input-validation gaps across the wire protocol and client/server boundaries:
Float exponent overflow in _recv: _recv passes parse_constant=_no_constants to json.loads to reject literal NaN/Infinity, but omits parse_float, so overflowed float literals such as 1e309 or -1e309 parse to inf/-inf without raising ValueError.
Uncaught OverflowError on 64-bit integer overflow in _int / _Handler.handle: _int accepts any Python int, including negative values or values >= 2**63 (or > 9007199254740991). When passed to SQLite in mint_challenge, sqlite3 raises built-in OverflowError (Python int too large to convert to SQLite INTEGER), which is neither a (KeyError, TypeError, ValueError) nor a sqlite3.Error, so _Handler.handle fails to catch it and drops the connection instead of returning {"error": "malformed"}.
Empty string identifiers and unvalidated nonce format in _str / _dispatch: _str accepts "" for issuer, token_id, session_id, and call_id, and _dispatch accepts non-hex or wrong-length nonce values instead of requiring 32 lowercase hex characters ([0-9a-f]{32}).
Unvalidated timeout in RemoteGateStore.__init__: RemoteGateStore accepts timeout=False, timeout=0, timeout=-1.0, or timeout=float("nan") at construction time instead of raising ValueError.
_recv rejects non-finite parse_float values with ValueError.
_int enforces 0 <= value <= v._MAX_INT (9007199254740991), raising ValueError on negative or oversized integers so _Handler.handle returns {"error": "malformed"}.
_str rejects empty strings "", and _nonce requires [0-9a-f]{32}.
RemoteGateStore.__init__ validates that timeout is a positive finite int or float (excluding bool).
Impact
Prevents unhandled OverflowError crashes in GateStoreServer, non-finite float smuggling over the wire protocol, empty identifier rows in SQLite state, and invalid socket timeouts in RemoteGateStore.
Activity
github-actions commentedon Oct 30, 2026
🟡 Contributor Check: MEDIUM
Automated check by AgenTrust Contributor Check.