[4.0] Update PrefixField.php in Installer#25144
[4.0] Update PrefixField.php in Installer#25144Duke3D wants to merge 6 commits intojoomla:4.0-devfrom
Conversation
When validating the user-entered database prefix, convert to lowercase so that value stored in configuration.php is in alignment with the convert to lowercase default behaviour of the MySQL database.
|
This deals only for the session prefix. It should also deal with new prefix when modified, therefore out of the if/else. |
|
To satisfy the codestyle requirements please address the following issues |
|
@Duke3D Please do as requested here: #25144 (comment) |
|
I have tested this item 🔴 unsuccessfully on 0e7b5ca This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25144. |
|
To fix #25144 (comment) , the checks have to be added to 2 places:
(Or maybe just the regex needs to be modified). If my PR #29362 will be ready and merged, it will be only one place where to change that. But I am in doubt if this PR here is right, because we had such check already for PostgreSQL, where it seems to matter, e.g. here: So I think it could have had a reason why we only did it for PostgreSQL and not for MySQL. But who knows, maybe it was wrong all the time for MySQL. |
|
@Duke3D Any interest in picking this up or should the PR be closed? |
|
Closing due to no response. |
Pull Request for Issue # .
First report.
Summary of Changes
Added to validation of user-entered database prefix.
Testing Instructions
Run Installer.
A) At Database Prefix field, enter mixed or upper case prefix ending with underscore.
B) Repeat except enter mixed or upper case prefix without underscore.
Expected result
Installed database has lowercase prefix and value matches database prefix as stored in configuration.php.
Actual result
If not patched, installed database has lowercase prefix. Database prefix stored in configuration.php has mixed case prefix. Can lead to database issues on Linux servers and reference errors that appear on server migration.
Documentation Changes Required
None