Repository navigation
fix(runtime): split TELEGRAM_ALLOWED_ROOTS correctly when a path ends in a one-letter folder - #337
Merged
Merged
Conversation
… in a one-letter folder The colon delimiter was skipped after any single letter to protect Windows drives (C:\path), so /data/photos:/data/a was not split at the colon after the folder named a. The glued string was then created as a new directory and became the only allowed root. Treat a colon as a drive separator only when the letter starts the value or a list entry. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018Xun6C4mXUAKbVSmiEEh79
chigwell
approved these changes
Oct 20, 2026
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.
Summary
Splitting
TELEGRAM_ALLOWED_ROOTSused the lookbehind regex(?<!\b[a-zA-Z]):to avoid cutting Windows drive prefixes (C:\path). The heuristic misfires for POSIX paths with a one-letter folder at an entry boundary: in/data/a:/data/bthe colon follows the single-letter foldera, so the separator is not recognized and the two roots collapse into one broken path.This replaces the regex with a scan that treats a colon as a drive prefix only when the single letter starts the whole value or an entry (i.e. is preceded by
;,,, whitespace, or a quote); any other:is a separator. WindowsC:\...entries keep working.Testing
tests/test_allowed_roots_env.pycovers the one-letter-folder case.🤖 Generated with Claude Code