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

管理者ログイン画面のID, PWの長さ制限をeccube.yamlの設定値にそろえる #5621

Merged

Conversation

kazuyoshikakihara
Copy link
Contributor

概要(Overview・Refs Issue)

Form/Type/Admin/LoginType.php 内の login_id, password の長さ制限(maxlength)がハードコーディングされていました。
eccube.yaml 内でid, password の長さ制限値(eccube_id_max_len, eccube_password_max_len)を大きな値に変更した場合にログインできなくなる恐れがあるので、eccube.yaml の値をそのまま持ってくるように修正しました。

テスト(Test)

もともと動作していた部分ですので、テストに手は加えていません

念のため、正しい id, password の組み合わせでログインできること、不正な id, password の組み合わせでログインできないことを目視確認してあります。

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

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

レビュワー確認項目

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

@codecov-commenter
Copy link

Codecov Report

Merging #5621 (b4ca351) into 4.2 (b9883b7) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                4.2    #5621      +/-   ##
============================================
+ Coverage     78.84%   78.85%   +0.01%     
  Complexity     6259     6259              
============================================
  Files           469      469              
  Lines         21001    21002       +1     
============================================
+ Hits          16558    16561       +3     
+ Misses         4443     4441       -2     
Flag Coverage Δ
E2E 64.79% <100.00%> (+0.02%) ⬆️
Unit 77.55% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
src/Eccube/Form/Type/Admin/LoginType.php 100.00% <100.00%> (ø)
...ontroller/Admin/Product/ProductClassController.php 90.85% <0.00%> (+0.57%) ⬆️
...be/Service/PurchaseFlow/Processor/TaxProcessor.php 84.21% <0.00%> (+1.75%) ⬆️

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

@chihiro-adachi
Copy link
Contributor

@kazuyoshikakihara
ありがとうございます。E2Eテストが落ちているようなのでご確認お願いできますでしょうか。

@chihiro-adachi chihiro-adachi added this to the 4.2.0 milestone Aug 24, 2022
@kazuyoshikakihara
Copy link
Contributor Author

@chihiro-adachi
#5613 に関連しそうなので
そちらに2件コメントさせていただきました。
#5613 (comment)
#5613 (comment)

今回のプルリクエストの問題ではないようです。

@chihiro-adachi chihiro-adachi added Status: ready-for-merge bugbounty2022:pr:entry バグバウンティ2022 バグ登録 PR登録 bugbounty2022:pr:recognition バグバウンティ2022 バグ登録 PR取込 Status: fix-me and removed Status: fix-me Status: ready-for-merge bugbounty2022:pr:recognition バグバウンティ2022 バグ登録 PR取込 labels Aug 31, 2022
@@ -49,7 +58,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
]);
$builder->add('password', PasswordType::class, [
'attr' => [
'maxlength' => 50,
'maxlength' => $this->eccubeConfig['eccube_password_max_len'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kazuyoshikakihara
eccube_password_max_lenはeccube.ymlでは32で定義されているようです。
eccube.ymlの値も50に更新お願いできますでしょうか。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

外部からは32か50かどちらが正しいのかわかりませんので、ご指示どおり50にします。

Copy link
Contributor

@chihiro-adachi chihiro-adachi Sep 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kazuyoshikakihara
ご対応ありがとうございます。

外部からは32か50かどちらが正しいのかわかりませんので、ご指示どおり50にします。

どちらが正というわけではないですが、互換性の観点から大きい方に寄せることが多いです。

@chihiro-adachi chihiro-adachi added the bugbounty2022:pr:recognition バグバウンティ2022 バグ登録 PR取込 label Sep 1, 2022
@chihiro-adachi chihiro-adachi merged commit 7bb64b4 into EC-CUBE:4.2 Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugbounty2022:pr:entry バグバウンティ2022 バグ登録 PR登録 bugbounty2022:pr:recognition バグバウンティ2022 バグ登録 PR取込
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants