Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove purify filter #5785

Merged
merged 6 commits into from
Sep 13, 2022
Merged

Conversation

chihiro-adachi
Copy link
Contributor

概要(Overview・Refs Issue)

twig内のpurify フィルタが性能面で影響があることがわかったため、管理画面での登録時にフィルタリングするように修正しています。

#5781

方針(Policy)

  • 管理画面で登録し、フロントで出力している項目のpurifyフィルタを対象とする
  • 管理画面で出力している項目は対象外
  • Shopping/complete.twigは、プラグインからの入力のためそのままのこしておく

実装に関する補足(Appendix)

テスト(Test)

画面の出力結果を確認しているテストを、登録時のテストに変更しました。

相談(Discussion)

マイナーバージョン互換性保持のための制限事項チェックリスト

  • 既存機能の仕様変更はありません
  • フックポイントの呼び出しタイミングの変更はありません
  • フックポイントのパラメータの削除・データ型の変更はありません
  • twigファイルに渡しているパラメータの削除・データ型の変更はありません
  • Serviceクラスの公開関数の、引数の削除・データ型の変更はありません
  • 入出力ファイル(CSVなど)のフォーマット変更はありません

レビュワー確認項目

  • 動作確認
  • コードレビュー
  • E2E/Unit テスト確認(テストの追加・変更が必要かどうか)
  • 互換性が保持されているか
  • セキュリティ上の問題がないか
    • 権限を超えた操作が可能にならないか
    • 不要なファイルアップロードがないか
    • 外部へ公開されるファイルや機能の追加ではないか
    • テンプレートでのエスケープ漏れがないか

@chihiro-adachi chihiro-adachi added this to the 4.2.0 milestone Sep 12, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #5785 (782a854) into 4.2 (4c27230) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                4.2    #5785      +/-   ##
============================================
- Coverage     78.86%   78.83%   -0.04%     
- Complexity     6274     6275       +1     
============================================
  Files           469      469              
  Lines         21076    21077       +1     
============================================
- Hits          16622    16615       -7     
- Misses         4454     4462       +8     
Flag Coverage Δ
E2E 63.69% <100.00%> (-1.18%) ⬇️
Unit 77.64% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Eccube/Form/Type/Admin/NewsType.php 91.30% <ø> (ø)
src/Eccube/Form/Type/Admin/ProductType.php 98.00% <ø> (ø)
src/Eccube/Form/Type/Admin/TradeLawType.php 100.00% <ø> (ø)
...e/Form/Extension/HTMLPurifierTextTypeExtension.php 84.61% <100.00%> (ø)
src/Eccube/Service/SystemService.php 65.15% <0.00%> (-7.58%) ⬇️
src/Eccube/Twig/Template.php 50.00% <0.00%> (-5.56%) ⬇️
...Controller/Admin/Content/MaintenanceController.php 86.20% <0.00%> (-3.45%) ⬇️
.../Service/PurchaseFlow/Processor/PointProcessor.php 93.87% <0.00%> (-1.96%) ⬇️
src/Eccube/Kernel.php 89.17% <0.00%> (-0.64%) ⬇️
...ontroller/Admin/Product/ProductClassController.php 90.28% <0.00%> (-0.58%) ⬇️
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@kiy0taka kiy0taka merged commit 06f8dc1 into EC-CUBE:4.2 Sep 13, 2022
@chihiro-adachi chihiro-adachi deleted the remove-purify-filter branch September 13, 2022 22:39
@chihiro-adachi
Copy link
Contributor Author

#5372
#5392

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.

3 participants