Repository navigation
Conversation
On NTFS a colon in a filename is read as an Alternate Data Stream separator (`filename:stream`), so a colon-bearing session_id joined into `position.<session_id>` could silently land as an ADS on an existing file rather than a distinct file of its own. _validate_session_id() already rejected '/', '\' and '..'; this adds ':' to the same check, shared by find_session() and (since #538/#541) cmd_save_position() and its eviction-loop cleanup. No caller today supplies a colon-bearing session_id -- all current callers pass Claude Code's own UUID-shaped ids -- so this is hardening against a future caller, the same framing #538 used for the traversal check. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Bv6BGZD2EdZ9EuJ7tPDTb7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #544
_validate_session_id() in pipeline/extract.py rejected path separators and ".." but not ":". On NTFS a colon in a filename is read as an Alternate Data Stream separator (filename:stream), so a colon-bearing session_id joined into position.<session_id> could silently write to/read from an existing file's ADS instead of a distinct file of its own.
This adds ":" to the same check, shared by find_session() and (since #538/#541) cmd_save_position() and its eviction-loop cleanup.
No caller today supplies a colon-bearing session_id -- every current caller passes Claude Code's own UUID-shaped ids -- so this is hardening against a future caller, the same framing #538 used for the traversal check.
Test plan