mlliuz
102bc5ef79
fix: prevent path traversal via session_id in session_store
...
load_session/save_session built the session file path directly from the
caller-supplied session_id with no validation, so a value like
'../../../tmp/secrets' (reachable from the 'load-session' CLI subcommand)
could read or write JSON files outside the session directory.
Add _validate_session_id() to reject anything outside [A-Za-z0-9_-]
(path separators, '..', absolute/Windows paths) before the id is used to
build a filename. Legitimate ids (uuid4 hex, 'session-<digits>-<n>') are
unaffected.
Adds SessionStorePathTraversalTests covering traversal rejection on both
load and save plus a legitimate-id round-trip.
2026-10-11 20:31:56 +00:00
..
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-03-31 07:17:34 -07:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-04-03 18:35:27 +09:00
2026-03-31 08:16:20 -07:00
2026-04-03 18:35:27 +09:00
2026-08-16 15:18:33 +09:00
2026-03-31 08:16:20 -07:00
2026-03-31 08:16:20 -07:00
2026-06-25 15:43:30 +08:00
2026-03-31 08:16:20 -07:00
2026-03-31 07:17:34 -07:00
2026-03-31 07:17:34 -07:00
2026-03-31 08:16:20 -07:00
2026-03-31 07:17:34 -07:00
2026-03-31 08:16:20 -07:00
2026-03-31 08:16:20 -07:00
2026-03-31 08:16:20 -07:00
2026-03-31 07:17:34 -07:00
2026-03-31 07:17:34 -07:00
2026-03-31 08:16:20 -07:00
2026-05-14 17:18:52 +09:00
2026-03-31 07:17:34 -07:00
2026-06-08 10:18:48 +08:00
2026-05-14 17:18:52 +09:00
2026-03-31 07:17:34 -07:00
2026-03-31 08:16:20 -07:00
2026-03-31 07:17:34 -07:00
2026-05-14 17:18:52 +09:00
2026-03-31 07:17:34 -07:00
2026-03-31 07:17:34 -07:00
2026-03-31 08:16:20 -07:00
2026-03-31 07:17:34 -07:00
2026-05-15 10:07:47 +09:00
2026-10-11 20:31:56 +00:00
2026-03-31 08:16:20 -07:00
2026-03-31 08:16:20 -07:00
2026-03-31 07:17:34 -07:00
2026-03-31 07:17:34 -07:00
2026-03-31 08:16:20 -07:00
2026-03-31 07:17:34 -07:00
2026-05-14 17:18:52 +09:00
2026-03-31 08:16:20 -07:00