mirror of
https://github.com/flarum/framework.git
synced 2025-06-22 18:41:30 +08:00
Disallow dashes in database prefix (#3089)
As a temporary fix it has been requested to disallow dashes in the database prefix. The installation process fails when the prefix does include a dash. #3022
This commit is contained in:
@ -87,8 +87,8 @@ class DatabaseConfig implements Arrayable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($this->prefix)) {
|
if (! empty($this->prefix)) {
|
||||||
if (! preg_match('/^[\pL\pM\pN_-]+$/u', $this->prefix)) {
|
if (! preg_match('/^[\pL\pM\pN_]+$/u', $this->prefix)) {
|
||||||
throw new ValidationFailed('The prefix may only contain characters, dashes and underscores.');
|
throw new ValidationFailed('The prefix may only contain characters and underscores.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($this->prefix) > 10) {
|
if (strlen($this->prefix) > 10) {
|
||||||
|
Reference in New Issue
Block a user