fix: ESI/fragments を既定で無効化する - #7071
Conversation
EC-CUBE コアはブロック描画に inline フラグメントレンダラ
({{ render(path(...)) }}) のみを使用しており、ESI/hinclude レンダラや
fragments リスナー(公開エンドポイント /_fragment)を利用していない。
未使用の機能を既定で有効にしておくと /_fragment が露出するため、
既定で無効化して攻撃面を削減する。
- コアの表示・機能への影響なし (inline レンダラと fragment.handler は維持、
cache:clear も正常)
- render_esi() / render_hinclude() と HTTP キャッシュ(ESI)ゲートウェイを
使うプロジェクトのみ、個別に有効化する
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughESI とフラグメントを無効化しました。インラインフラグメントレンダラーを使用する設定に変更しました。 Changesフラグメント設定
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This change disables unused ESI and fragment endpoints by default while preserving inline block rendering, reducing exposed attack surface without a known functional impact. No actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.4 #7071 +/- ##
==========================================
- Coverage 77.67% 77.64% -0.03%
==========================================
Files 597 597
Lines 29333 29333
==========================================
- Hits 22785 22777 -8
- Misses 6548 6556 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
概要
EC-CUBE コアはブロック描画に inline フラグメントレンダラ (
{{ render(path(...)) }}) のみを使用しており、ESI / hinclude レンダラや fragments リスナー(公開エンドポイント/_fragment)を利用していません。未使用のまま既定で有効化しておくと/_fragmentが露出するため、既定で無効化して攻撃面を削減します。変更内容
app/config/eccube/packages/framework.yamlのesi/fragmentsをenabled: falseに変更しました。影響調査
src/Eccube)およびテンプレートでrender_esi()/render_hinclude()/esi:include/hx:includeの使用なしHttpCache/Surrogateなど ESI ゲートウェイの登録なしfragment.renderer.inline)とfragment.handlerは維持され、ブロック描画は従来通り動作cache:clear(prod) が正常完了(コンパイルエラーなし)fragment.listener(/_fragment) と、未使用のfragment.renderer.esi/fragment.renderer.hincludeのみ有効化が必要なケース
render_esi()/render_hinclude()を HTTP キャッシュ(ESI)ゲートウェイと組み合わせて使うプロジェクトは、個別にenabled: trueへ戻してください。🤖 Generated with Claude Code
Summary by CodeRabbit