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

fix:インストール時のDBパスワード入力フォームからpurifyを外す #6031

Merged

Conversation

dotani1111
Copy link
Contributor

@dotani1111 dotani1111 commented Aug 18, 2023

概要(Overview・Refs Issue)

インストール時のDBパスワードに、記号が入っていた場合は変換されてしまうため、DBへの接続が出来ない。
#6025

方針(Policy)

DBの設定には ! # % & ( ) * + , - . / ; < = > ? @ [ ] ^ _ { | } ~の記号が使えるとの事なので、記号があった場合でも接続できるようにする。
https://faq.zenlogic.jp/faqs/FAQ01272

実装に関する補足(Appendix)

テスト(Test)

  • パスワードに「! # % & ( ) * + , - . / ; < = > ? @ [ ] ^ _ { | } ~ 」を入れた状態で、フロントに出力
    した結果、全て半角になっていた。
string(52) "! # % & ( ) * + , - . / ; < = > ? @ [ ] ^ _ { | } ~ "
  • 実際にパスワードに&が含まれるユーザで、動作確認を行なって、問題なく動作した。

相談(Discussion)

  • このパスワードフォームを用いて、攻撃が可能になってしまっていないか?
    フロントに表示や、DBに保存などしていなく、.envはテキストベースなので、攻撃は出来ないと考えています。

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

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

レビュワー確認項目

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

@codecov-commenter
Copy link

Codecov Report

Merging #6031 (0ef1706) into 4.2 (ac096e5) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@             Coverage Diff              @@
##                4.2    #6031      +/-   ##
============================================
- Coverage     82.55%   82.55%   -0.01%     
  Complexity     6425     6425              
============================================
  Files           475      475              
  Lines         25859    25860       +1     
============================================
  Hits          21348    21348              
- Misses         4511     4512       +1     
Flag Coverage Δ
E2E 69.48% <0.00%> (+<0.01%) ⬆️
Unit 79.73% <0.00%> (-0.01%) ⬇️

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

Files Changed Coverage Δ
src/Eccube/Form/Type/Install/Step4Type.php 0.00% <0.00%> (ø)

@dotani1111 dotani1111 self-assigned this Oct 1, 2023
@dotani1111 dotani1111 added this to the 4.2.x milestone Nov 27, 2023
@shinya
Copy link
Contributor

shinya commented Dec 11, 2023

検証して問題無ければ、次回のVersionUP取り込み候補

@dotani1111 dotani1111 modified the milestones: 4.2.x, 4.3.0 Jan 17, 2024
@ji-eunsoo ji-eunsoo merged commit 134f506 into EC-CUBE:4.3 Jan 24, 2024
194 checks passed
@dotani1111 dotani1111 deleted the features/fix_install_database_password_form branch May 22, 2024 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants