fix #4123 【システム】データベースのプレフィックスに大文字を使うと機能しなくなる件を修正#4426
Open
kaburk wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
インストーラーの Step3(DB 接続設定)において、テーブルプレフィックスに大文字が含まれる場合に不具合につながる問題(#4123)を、入力時点で検出してエラー表示することで回避する PR です。フロント(JS)とサーバー(Controller)の双方で同一ルール(英小文字・数字・アンダースコア、かつ末尾アンダースコア)に統一し、回帰テストも追加しています。
Changes:
- Step3 のサーバー側で、無効な
dbPrefix(大文字を含む等)をcheckDb/createDb実行前にエラー扱いにするバリデーションを追加 - Step3 のフロント側(JS)でも許容プレフィックスの正規表現を英小文字に限定するよう修正
- 無効プレフィックス時の挙動を確認するテストケースを追加
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/bc-installer/tests/TestCase/Controller/Admin/InstallationsControllerTest.php | 大文字を含むプレフィックスが checkDb/createDb でエラーになることのテストを追加 |
| plugins/bc-installer/src/Controller/Admin/InstallationsController.php | dbPrefix をサーバー側でも検証し、無効なら DB 接続/作成処理を実行しないように修正 |
| plugins/bc-admin-third/webroot/bc_installer/js/admin/installations/step3.bundle.js | 生成済みバンドル側の正規表現を英小文字に限定するよう更新 |
| plugins/bc-admin-third/templates/plugin/BcInstaller/Admin/Installations/step3.php | 画面上のメッセージ文言を「半角英小文字」前提に更新 |
| plugins/bc-admin-third/src/bc_installer/js/admin/installations/step3.js | クライアント側のプレフィックス検証正規表現を英小文字に限定するよう修正 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
よろしくお願いします!