Austin Pickett
ee2ed10ef5
fix(sessions): validate imported values before persistence
...
Session import used shallow type casts at the persistence boundary:
float() accepted inf/NaN (a JSON 1e309), int() accepted integers
SQLite cannot bind (outside signed 64-bit range), model_config was
only shape-checked after its intentional decode, and a literal string
carrying the internal \\x00json: content marker was decoded as
structured content on read. Bad values reached sqlite3 binding or
persisted as inf, breaking session APIs with HTTP 500.
- reject non-finite floats in session float/timestamp columns, message
timestamps, and scalar message content, with the field path in the error
- re-check every intentionally-decoded JSON-backed field (model_config,
reasoning_details, codex_* items) for non-finite values
- bound int columns, token_count, and int scalar content to SQLite's
signed 64-bit range; coerce-with-default at the bind site as a backstop
- escape literal \\x00json:-prefixed strings via the JSON wrapper instead
of storing them raw; decoding already fails closed on malformed marker rows
- all rejection stays inside the existing atomic validate-then-write
400 contract; valid exports round-trip unchanged
Fixes #63954
2026-10-06 12:40:04 -04:00
..
2026-09-11 11:14:56 +05:30
2026-09-11 11:14:56 +05:30
2026-09-13 09:18:02 -07:00
2026-09-19 10:08:14 -07:00
2026-09-28 21:03:09 -04:00
2026-09-21 19:18:15 -04:00
2026-09-21 02:56:31 -07:00
2026-09-13 09:18:02 -07:00
2026-09-15 05:41:36 -07:00
2026-09-23 03:15:26 -07:00
2026-09-20 10:32:40 -07:00
2026-09-20 10:09:12 -07:00
2026-09-19 00:59:32 +05:30
2026-09-13 09:18:02 -07:00
2026-09-18 10:39:13 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 09:18:02 -07:00
2026-09-25 10:46:54 -05:00
2026-09-23 03:15:26 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 09:18:02 -07:00
2026-09-20 00:14:10 -07:00
2026-10-06 12:03:11 -04:00
2026-09-23 15:26:34 -04:00
2026-10-03 16:32:15 +05:30
2026-09-18 19:06:52 -04:00
2026-09-23 07:02:44 -04:00
2026-09-13 09:18:02 -07:00
2026-10-03 18:30:38 +05:30
2026-09-28 20:17:37 -05:00
2026-09-27 03:03:46 -05:00
2026-09-13 09:18:02 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 09:18:02 -07:00
2026-09-21 06:09:56 -04:00
2026-09-23 16:59:09 -07:00
2026-09-13 09:18:02 -07:00
2026-09-18 10:38:41 -07:00
2026-09-23 03:15:26 -07:00
2026-09-18 17:26:10 -04:00
2026-09-18 10:38:41 -07:00
2026-09-29 04:15:21 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-15 12:33:45 -05:00
2026-09-13 09:18:02 -07:00
2026-09-23 03:15:26 -07:00
2026-10-03 17:44:58 +05:30
2026-10-04 12:05:37 +05:30
2026-09-23 07:02:44 -04:00
2026-09-23 10:34:54 -07:00
2026-09-23 07:02:44 -04:00
2026-10-03 23:03:42 +05:30
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-10-03 17:44:58 +05:30
2026-09-23 07:02:44 -04:00
2026-09-21 20:29:18 -04:00
2026-09-29 04:15:21 +05:30
2026-09-15 04:12:13 -07:00
2026-10-03 16:32:15 +05:30
2026-09-23 03:15:26 -07:00
2026-09-13 09:18:02 -07:00
2026-09-28 04:34:30 -07:00
2026-09-13 09:18:02 -07:00
2026-09-24 06:27:07 -05:00
2026-10-03 16:30:15 +05:30
2026-09-27 00:43:39 +05:30
2026-09-18 09:53:41 -07:00
2026-09-23 22:22:32 +05:30
2026-09-13 09:18:02 -07:00
2026-09-14 09:19:20 -07:00
2026-09-13 14:45:41 -07:00
2026-09-18 09:53:41 -07:00
2026-09-26 22:52:51 -05:00
2026-10-03 18:17:35 +05:30
2026-09-23 03:15:26 -07:00
2026-09-20 16:47:29 +05:30
2026-09-21 19:18:15 -04:00
2026-09-20 12:12:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-15 04:01:17 -07:00
2026-09-26 22:27:13 +05:30
2026-09-20 12:15:51 -07:00
2026-09-20 10:40:48 -07:00
2026-09-23 03:15:26 -07:00
2026-09-20 11:40:16 -07:00
2026-09-13 09:18:02 -07:00
2026-09-23 03:15:26 -07:00
2026-09-28 20:17:37 -05:00
2026-09-13 09:18:02 -07:00
2026-09-15 03:51:07 -07:00
2026-09-13 09:18:02 -07:00
2026-10-04 12:05:37 +05:30
2026-10-03 16:41:37 +05:30
2026-10-06 12:40:04 -04:00
2026-10-02 02:34:41 +05:30
2026-09-13 09:18:02 -07:00
2026-10-03 17:44:58 +05:30
2026-09-13 09:18:02 -07:00
2026-09-11 09:36:04 -04:00
2026-09-26 20:40:40 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-13 09:18:02 -07:00
2026-09-15 04:19:19 -07:00
2026-09-23 07:02:44 -04:00
2026-10-01 05:25:47 -05:00
2026-09-28 02:26:21 -07:00
2026-09-13 09:18:02 -07:00
2026-09-24 08:51:52 -04:00
2026-09-24 08:51:52 -04:00
2026-09-21 19:18:15 -04:00
2026-09-13 21:13:23 -07:00
2026-09-23 07:02:44 -04:00
2026-09-13 09:18:02 -07:00
2026-09-19 04:49:23 -04:00
2026-09-13 09:18:02 -07:00
2026-09-13 09:18:02 -07:00
2026-09-14 08:50:29 -07:00
2026-09-18 19:06:52 -04:00
2026-09-23 07:02:44 -04:00
2026-09-13 09:18:02 -07:00
2026-09-23 08:20:01 -04:00
2026-09-23 08:20:01 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 10:17:46 -04:00
2026-09-18 10:30:20 -07:00
2026-09-23 15:26:34 -04:00
2026-09-19 03:14:20 +05:30
2026-10-02 01:04:12 +05:30
2026-09-11 06:23:23 -07:00
2026-09-23 10:34:54 -07:00
2026-09-26 11:32:10 -07:00
2026-09-18 19:06:52 -04:00
2026-09-13 09:18:02 -07:00
2026-09-28 02:26:21 -07:00
2026-09-23 11:35:07 -07:00
2026-09-23 03:15:26 -07:00
2026-09-13 09:18:02 -07:00