Skip to content

fix(runtime): split TELEGRAM_ALLOWED_ROOTS correctly when a path ends in a one-letter folder - #337

Merged
chigwell merged 1 commit into
chigwell:mainfrom
axisrow:fix/allowed-roots-split
Oct 20, 2026
Merged

chigwell merged 1 commit into
chigwell:mainfrom
axisrow:fix/allowed-roots-split

Conversation

@axisrow

@axisrow axisrow commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Splitting TELEGRAM_ALLOWED_ROOTS used 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/b the colon follows the single-letter folder a, 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. Windows C:\... entries keep working.

Testing

  • tests/test_allowed_roots_env.py covers the one-letter-folder case.
  • Full suite: 1409 passed.

🤖 Generated with Claude Code

… 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
chigwell merged commit 9dbecff into chigwell:main Oct 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants