50239d4b49
The save hook uses SESSION_ID in file paths (state_dir/). A crafted session_id value like '../../etc/cron.d/evil' could write state files outside the intended directory. Strip everything except [a-zA-Z0-9_-] from SESSION_ID, defaulting to 'unknown' if empty after sanitization. Finding: #4 (HIGH — path traversal via SESSION_ID) Includes test infrastructure from PR #131. 92 tests pass.