René's URL Explorer Experiment


Title: fix(raw): escape path segments when building raw content URLs by sarankumar1325 · Pull Request #3615 · github/github-mcp-server · GitHub

Open Graph Title: fix(raw): escape path segments when building raw content URLs by sarankumar1325 · Pull Request #3615 · github/github-mcp-server

X Title: fix(raw): escape path segments when building raw content URLs by sarankumar1325 · Pull Request #3615 · github/github-mcp-server

Description: Summary repo:// resource reads now percent-encode each path segment before building the raw.githubusercontent.com URL, so file names containing % are fetched exactly as named. Why Fixes #3614 raw.Client passed the decoded owner/repo/ref/path to url.URL.JoinPath, which treats its arguments as already escaped. A.txt was fetched as A.txt, and 100%.txt (an invalid escape) made JoinPath quietly fall back to the base URL, so the resource returned GitHub's homepage HTML as the file content. What changed pkg/raw/raw.go: new escapePathSegments helper applies url.PathEscape to every /-separated segment of owner, repo, ref/sha and path before JoinPath in refURL and commitURL. The existing .. traversal rejection runs first and is unchanged. pkg/raw/raw_test.go: cases for docs/100%.txt, A.txt, % with a SHA, and space/#/?/unicode in a ref and path. The old benign percent-encoded filename allowed case expected .hidden to go out unescaped, which actually requested .hidden. It now expects %2ehidden. pkg/github/repository_resource_test.go: handler-level test that repo://owner/repo/contents/docs/100%.txt and .../%41.txt request /owner/repo/HEAD/docs/100%.txt and /owner/repo/HEAD/A.txt. Both fail on main (one errors, one requests A.txt). MCP impact No tool or API changes. Only the URL the repository resource handler fetches changes, and only for names containing characters that need escaping. Tool schema or behavior changed New tool added Prompts tested (tool changes only) N/A (no tool changes) Security / limits No security or limits impact Auth / permissions considered. Path traversal checks (rejectPathTraversal) still run on the unescaped input before escaping, and escaping means an encoded .. can no longer be decoded by JoinPath. Data exposure, filtering, or token/size limits considered Tool renaming I am renaming tools as part of this PR (e.g. a part of a consolidation effort) I have added the new tool aliases in deprecated_tool_aliases.go I am not renaming tools as part of this PR Lint & tests Linted locally with ./script/lint (gofmt -s and golangci-lint v2.14.0: 0 issues) Tested locally with ./script/test (go test ./... passes) Docs Not needed Updated (README / docs / examples) I used an AI assistant to write this change. I reviewed the diff and ran the tests above.

Open Graph Description: Summary repo:// resource reads now percent-encode each path segment before building the raw.githubusercontent.com URL, so file names containing % are fetched exactly as named. Why Fixes #3614 raw.C...

X Description: Summary repo:// resource reads now percent-encode each path segment before building the raw.githubusercontent.com URL, so file names containing % are fetched exactly as named. Why Fixes #3614 raw.C...

Opengraph URL: https://github.com/github/github-mcp-server/pull/3615

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:7298784e-11a3-99ee-75ae-6761400048ec
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id815A:44613:10608A:162D18:6B05D0E8
html-safe-nonce13a6c01c1b38941a9aa9cf65a57575d7269eb098a9cc6441e418fe9c85101853
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTVBOjQ0NjEzOjEwNjA4QToxNjJEMTg6NkIwNUQwRTgiLCJ2aXNpdG9yX2lkIjoiMzIxOTAyNjkyNzI4MTM2MTEyOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac90a6f2d6403411d30420b0e24a7f430d1ee611fce2d4b0d8bb7509acad4a299a
hovercard-subject-tagpull_request:5067992811
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/github-mcp-server/pull/3615/files
twitter:imagehttps://avatars.githubusercontent.com/u/120080287?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/120080287?s=400&v=4
og:image:altSummary repo:// resource reads now percent-encode each path segment before building the raw.githubusercontent.com URL, so file names containing % are fetched exactly as named. Why Fixes #3614 raw.C...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None08d6d51500e13cdaf71a9aad37c03e883f1143f9325056e77a14fa0d06d5bf64
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id942771284
octolytics-dimension-repository_nwogithub/github-mcp-server
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id942771284
octolytics-dimension-repository_network_root_nwogithub/github-mcp-server
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release839b69d5acfb3181bc844f20b9848f74b957add3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/github-mcp-server/pull/3615/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fgithub-mcp-server%2Fpull%2F3615%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fgithub-mcp-server%2Fpull%2F3615%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=github%2Fgithub-mcp-server
Reloadhttps://github.com/github/github-mcp-server/pull/3615/files
Reloadhttps://github.com/github/github-mcp-server/pull/3615/files
Reloadhttps://github.com/github/github-mcp-server/pull/3615/files
githubhttps://github.com/github
github-mcp-serverhttps://github.com/github/github-mcp-server
Codehttps://github.com/github/github-mcp-server
Issues238 (238)https://github.com/github/github-mcp-server/issues
Pull requests226 (226)https://github.com/github/github-mcp-server/pulls
Discussionshttps://github.com/github/github-mcp-server/discussions
Actionshttps://github.com/github/github-mcp-server/actions
Security and quality2 (2)https://github.com/github/github-mcp-server/security
Insightshttps://github.com/github/github-mcp-server/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fgithub-mcp-server%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fgithub-mcp-server%2Fissues%2Fnew%2Fchoose
sarankumar1325https://github.com/sarankumar1325
github:mainhttps://github.com/github/github-mcp-server/tree/main
sarankumar1325:fix-raw-percent-filenameshttps://github.com/sarankumar1325/github-mcp-server/tree/fix-raw-percent-filenames
Conversation 1 https://github.com/github/github-mcp-server/pull/3615
Commits 2 https://github.com/github/github-mcp-server/pull/3615/commits
Checks 1 https://github.com/github/github-mcp-server/pull/3615/checks
Findings https://github.com/github/github-mcp-server/pull/3615/findings
Files changed https://github.com/github/github-mcp-server/pull/3615/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/3615/files
fix(raw): escape path segments when building raw content URLs https://github.com/github/github-mcp-server/pull/3615/files#top
Show all changes 2 commits https://github.com/github/github-mcp-server/pull/3615/files
275a19f fix(raw): escape path segments when building raw content URLs sarankumar1325 Oct 29, 2026 https://github.com/github/github-mcp-server/pull/3615/commits/275a19f03666ae4ac1f2c11e3f7fe6f2246f8d2a
58a6577 Merge remote-tracking branch 'upstream/main' into fix-raw-percent-fil… sarankumar1325 Nov 11, 2026 https://github.com/github/github-mcp-server/pull/3615/commits/58a657721b3d5f45098d098dcef37d29f95d315c
Clear filters https://github.com/github/github-mcp-server/pull/3615/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/3615/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/3615/files
repository_resource_test.go https://github.com/github/github-mcp-server/pull/3615/files#diff-134064f0cd858eb16a795df5143e87363a3ac3bb4c6a58beddf2dbf1fd689ec3
raw.go https://github.com/github/github-mcp-server/pull/3615/files#diff-db02ed77c3d07c81feae4c8af134efe86dedeaffd4d50d2f6c623520089dd422
raw_test.go https://github.com/github/github-mcp-server/pull/3615/files#diff-b3ff23488a050ee936a168e1528cf3c9932f6a1033f620b7f5b5d0363e401d8d
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/github/repository_resource_test.gohttps://github.com/github/github-mcp-server/pull/3615/files#diff-134064f0cd858eb16a795df5143e87363a3ac3bb4c6a58beddf2dbf1fd689ec3
View file https://github.com/github/github-mcp-server/blob/58a657721b3d5f45098d098dcef37d29f95d315c/pkg/github/repository_resource_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3615/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3615/files#diff-134064f0cd858eb16a795df5143e87363a3ac3bb4c6a58beddf2dbf1fd689ec3
https://github.com/github/github-mcp-server/pull/3615/files#diff-134064f0cd858eb16a795df5143e87363a3ac3bb4c6a58beddf2dbf1fd689ec3
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/raw/raw.gohttps://github.com/github/github-mcp-server/pull/3615/files#diff-db02ed77c3d07c81feae4c8af134efe86dedeaffd4d50d2f6c623520089dd422
View file https://github.com/github/github-mcp-server/blob/58a657721b3d5f45098d098dcef37d29f95d315c/pkg/raw/raw.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3615/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3615/files#diff-db02ed77c3d07c81feae4c8af134efe86dedeaffd4d50d2f6c623520089dd422
https://github.com/github/github-mcp-server/pull/3615/files#diff-db02ed77c3d07c81feae4c8af134efe86dedeaffd4d50d2f6c623520089dd422
https://github.com/github/github-mcp-server/pull/3615/files#diff-db02ed77c3d07c81feae4c8af134efe86dedeaffd4d50d2f6c623520089dd422
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/raw/raw_test.gohttps://github.com/github/github-mcp-server/pull/3615/files#diff-b3ff23488a050ee936a168e1528cf3c9932f6a1033f620b7f5b5d0363e401d8d
View file https://github.com/github/github-mcp-server/blob/58a657721b3d5f45098d098dcef37d29f95d315c/pkg/raw/raw_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3615/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3615/files#diff-b3ff23488a050ee936a168e1528cf3c9932f6a1033f620b7f5b5d0363e401d8d
https://github.com/github/github-mcp-server/pull/3615/files#diff-b3ff23488a050ee936a168e1528cf3c9932f6a1033f620b7f5b5d0363e401d8d
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.