You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start the installation and insert a database with an invalid character (like "-"). You get an error: The database name is invalid. It must start with a letter, followed by alphanumeric characters..
Then the regex is wrong if it allows the _ and I will submit a pr for that
The dash is not allowed because it is not part of the specification from mysql - it may work but it is known to cause problems just as starting with a number may do
Steps to reproduce the issue
Start the installation and insert a database with an invalid character (like "-"). You get an error:
The database name is invalid. It must start with a letter, followed by alphanumeric characters.
.Checking the code here https://github.com/joomla/joomla-cms/blob/4.0-dev/installation/src/Model/DatabaseModel.php#L183-L188 and here: https://github.com/joomla/joomla-cms/blob/4.0-dev/installation/src/Model/SetupModel.php#L320-L325 the regexp is:
#^[a-zA-Z_][0-9a-zA-Z_$]*$#
means, a underscore is allowed, too as first char. Perhaps the error message should be changed (e.g. https://github.com/joomla/joomla-cms/blob/4.0-dev/installation/language/en-GB/en-GB.ini#L62 )The next question is: why is a normal dash not allowed?
The text was updated successfully, but these errors were encountered: