Skip to content

security: reject trailing spaces in .git path guard - #8408

Merged
unknwon merged 2 commits into
mainfrom
GHSA-85m5-cfw6-3cx8
Aug 26, 2026
Merged

unknwon merged 2 commits into
mainfrom
GHSA-85m5-cfw6-3cx8

Conversation

@unknwon

@unknwon unknwon commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

Hardens an internal path-safety guard used by the file editor and content APIs so it consistently rejects a class of platform-specific path variants it previously missed on some hosts.

Refs GHSA-85m5-cfw6-3cx8.

isRepositoryGitPath blocked the Windows trailing-dot form of ".git"
but not the trailing-space form. Normalize each path component by
trimming trailing dots and spaces before comparing, covering the
whole class of Windows path-normalization variants.

Claude-Session: https://claude.ai/code/session_01YYe7uW16MYhza8pMw1j2ek
@unknwon unknwon added this to the 0.14.4 milestone Aug 26, 2026
@unknwon
unknwon merged commit aec2b84 into main Aug 26, 2026
7 checks passed
@unknwon
unknwon deleted the GHSA-85m5-cfw6-3cx8 branch August 26, 2026 02:51
unknwon added a commit that referenced this pull request Nov 11, 2026
@unknwon unknwon mentioned this pull request Nov 11, 2026
4 of 6 tasks
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.

1 participant