Commit Graph

3 Commits

Author SHA1 Message Date
mlliuz eeea240857 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-06-11 12:56:41 +08:00
陈家名 eb21179dde fix: validate attached redirection paths 2026-06-08 10:18:48 +08:00
bellman 4af5664ff8 omx(team): auto-checkpoint worker-1 [1] 2026-05-14 17:18:52 +09:00