[#2373] Blocked access to 'web/core/*.txt' and '*.md' files in '.htaccess'.#2420
[#2373] Blocked access to 'web/core/*.txt' and '*.md' files in '.htaccess'.#2420AlexSkrypnyk merged 2 commits intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (1)
WalkthroughThe change adds a single Apache mod_rewrite rule to the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📋 Issue PlannerLet us write the prompt for your AI agent so you can ship faster (with fewer bugs). View plan for ticket: ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2420 +/- ##
==========================================
- Coverage 79.56% 79.08% -0.48%
==========================================
Files 126 119 -7
Lines 6734 6575 -159
Branches 44 0 -44
==========================================
- Hits 5358 5200 -158
+ Misses 1376 1375 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Code coverage (threshold: 90%) Per-class coverage |
Closes #2373
Summary
Added a
RewriteRuletoweb/.htaccessthat blocks public HTTP access to.txtand.mdfiles inside theweb/core/directory. This prevents exposure of Drupal core text files (such asCHANGELOG.txt,LICENSE.txt,README.md) via HTTP requests, which can leak version information and aid in fingerprinting the Drupal installation.Changes
web/.htaccessRewriteRule ^core/.*\.(txt|md)$ - [F]to deny access to.txtand.mdfiles under thecore/directory, returning a 403 Forbidden response.Installer test fixtures
.htaccesssnapshots inhosting_acquiaandhosting_project_name___acquiafixture directories to reflect the new rule, keeping test fixtures in sync with the production.htaccess.Before / After
Summary by CodeRabbit