Skip to content

fix: whitelist git protocol paths instead of blacklisting non-git paths#255

Merged
alecthomas merged 1 commit intomainfrom
aat/fix-git-request-classification
Apr 14, 2026
Merged

fix: whitelist git protocol paths instead of blacklisting non-git paths#255
alecthomas merged 1 commit intomainfrom
aat/fix-git-request-classification

Conversation

@alecthomas
Copy link
Copy Markdown
Collaborator

Switch handleRequest() from a blacklist approach (check for known
non-git paths, treat everything else as clone/fetch) to a whitelist
approach (only route /info/refs and /git-upload-pack to clone/fetch
handling, forward everything else to upstream).

This prevents LFS and other non-git requests from being misclassified
as clone operations.

Fixes #254

Co-authored-by: Claude Code noreply@anthropic.com

@alecthomas alecthomas enabled auto-merge (squash) April 14, 2026 03:17
@alecthomas alecthomas requested a review from a team as a code owner April 14, 2026 03:17
@alecthomas alecthomas requested review from worstell and removed request for a team April 14, 2026 03:17
@alecthomas alecthomas disabled auto-merge April 14, 2026 03:17
Switch handleRequest() from a blacklist approach (check for known
non-git paths, treat everything else as clone/fetch) to a whitelist
approach (only route /info/refs and /git-upload-pack to clone/fetch
handling, forward everything else to upstream).

This prevents LFS and other non-git requests from being misclassified
as clone operations.

Fixes #254

Co-authored-by: Claude Code <noreply@anthropic.com>
@alecthomas alecthomas force-pushed the aat/fix-git-request-classification branch from 529e4eb to facb98e Compare April 14, 2026 03:23
@alecthomas alecthomas merged commit 60950e8 into main Apr 14, 2026
8 checks passed
@alecthomas alecthomas deleted the aat/fix-git-request-classification branch April 14, 2026 03:33
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.

Figure out a way to differentiate git clones and normal requests

1 participant