File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
modules/setup/application/forms Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,19 @@ public function setDatabaseUsagePrivileges(array $privileges)
9191 */
9292 public function createElements (array $ formData )
9393 {
94+ if ($ this ->config ['db ' ] === 'mysql ' && preg_match ('/[_%]/ ' , $ this ->config ['dbname ' ])) {
95+ $ this ->warning (sprintf (
96+ $ this ->translate (
97+ 'The database name may contain either an underscore or a percent sign. '
98+ . ' In MySQL these characters represent a wildcard. If part of a database name, '
99+ . ' they might not have been escaped when manually granting privileges. '
100+ . ' Privileges might not be detected in this case. Check the documentation and '
101+ . ' update your grants accordingly: %s '
102+ ),
103+ 'https://dev.mysql.com/doc/refman/8.0/en/grant.html#grant-quoting '
104+ ));
105+ }
106+
94107 $ skipValidation = isset ($ formData ['skip_validation ' ]) && $ formData ['skip_validation ' ];
95108 $ this ->addElement (
96109 'text ' ,
You can’t perform that action at this time.
0 commit comments