Title: Security: Block access to dotfiles and directories (.git, .env, etc.) · Issue #28 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Security: Block access to dotfiles and directories (.git, .env, etc.) · Issue #28 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Security: Block access to dotfiles and directories (.git, .env, etc.) · Issue #28 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Summary Solid pods currently serve dotfiles and dot-directories (e.g., .git/, .env) publicly. This is a security vulnerability - standard web server practice is to block access to these paths. Reproduction Initialize a git repo in a publ...
Open Graph Description: Summary Solid pods currently serve dotfiles and dot-directories (e.g., .git/, .env) publicly. This is a security vulnerability - standard web server practice is to block access to these paths. Repr...
X Description: Summary Solid pods currently serve dotfiles and dot-directories (e.g., .git/, .env) publicly. This is a security vulnerability - standard web server practice is to block access to these paths. Repr...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/28
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Security: Block access to dotfiles and directories (.git, .env, etc.)","articleBody":"## Summary\n\nSolid pods currently serve dotfiles and dot-directories (e.g., `.git/`, `.env`) publicly. This is a security vulnerability - standard web server practice is to block access to these paths.\n\n## Reproduction\n\n1. Initialize a git repo in a public pod directory:\n ```bash\n cd /path/to/pod/public/folder\n git init\n git add . && git commit -m \"Initial commit\"\n ```\n\n2. Access the git config via HTTP:\n ```\n GET https://example.solid.social/public/folder/.git/config\n ```\n\n3. **Result:** Git config is exposed:\n ```\n [core]\n repositoryformatversion = 0\n filemode = true\n bare = false\n logallrefupdates = true\n ```\n\n## Impact\n\nAn attacker could:\n- Reconstruct full repository history via `.git/objects/`\n- Access sensitive data from old commits\n- Read `.git/logs/` for activity patterns\n- Find credentials if `.env` files exist\n\n## Expected Behavior\n\nRequests to paths matching dotfile patterns should return `403 Forbidden`:\n- `/.git/`\n- `/.env`\n- `/.htaccess`\n- `/.DS_Store`\n- Any path segment starting with `.`\n\n## Suggested Implementation\n\n```javascript\n// Middleware to block dotfile access\nfunction blockDotfiles(req, res, next) {\n const segments = req.path.split('/');\n const hasDotfile = segments.some(seg => seg.startsWith('.') && seg.length > 1);\n\n if (hasDotfile) {\n return res.status(403).send('Forbidden: Dotfile access blocked');\n }\n next();\n}\n```\n\n## Configuration Option\n\nConsider a config flag for users who explicitly want dotfile access:\n\n```javascript\n{\n \"blockDotfiles\": true // default: true\n}\n```\n\n## References\n\n- Apache: `RedirectMatch 403 /\\.`\n- Nginx: `location ~ /\\. { deny all; }`\n- Express: Various dotfile-blocking middleware\n\n## Priority\n\n**High** - This is a security vulnerability with immediate exploit potential on any pod with version control.","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-01-01T09:49:36Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/28"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8b81f855-a214-05a3-0c66-6de151669f14 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 945E:51CB6:25C21A:30B8FB:6B03B61F |
| html-safe-nonce | a53270d9da20deebd637ca60a7d35ee7e63b3990f1b55349d5a9aaca7ac3a8e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDVFOjUxQ0I2OjI1QzIxQTozMEI4RkI6NkIwM0I2MUYiLCJ2aXNpdG9yX2lkIjoiNzUzODU1Mjk1Nzk0ODkwMDg5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 607fc6f4fc1f33a2c8fa31b61e809890948015e721b80fc6962caec1b9e637be |
| hovercard-subject-tag | issue:3774395543 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/28/issue_layout |
| twitter:image | https://opengraph.githubassets.com/56fba2afbba3b7791084a54fe95f9bbbe7dd08a0bb12573801354fcffb67d8c0/JavaScriptSolidServer/JavaScriptSolidServer/issues/28 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/56fba2afbba3b7791084a54fe95f9bbbe7dd08a0bb12573801354fcffb67d8c0/JavaScriptSolidServer/JavaScriptSolidServer/issues/28 |
| og:image:alt | Summary Solid pods currently serve dotfiles and dot-directories (e.g., .git/, .env) publicly. This is a security vulnerability - standard web server practice is to block access to these paths. Repr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width