From cf5662abb3541607b0f5ba69fef4a08537b7f9e9 Mon Sep 17 00:00:00 2001 From: Maarten Bicknese Date: Wed, 13 Oct 2021 20:52:53 +0200 Subject: [PATCH] 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 --- framework/core/src/Install/DatabaseConfig.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/core/src/Install/DatabaseConfig.php b/framework/core/src/Install/DatabaseConfig.php index 89ac46ed5..0fb350a7c 100644 --- a/framework/core/src/Install/DatabaseConfig.php +++ b/framework/core/src/Install/DatabaseConfig.php @@ -87,8 +87,8 @@ class DatabaseConfig implements Arrayable } if (! empty($this->prefix)) { - if (! preg_match('/^[\pL\pM\pN_-]+$/u', $this->prefix)) { - throw new ValidationFailed('The prefix may only contain characters, dashes and underscores.'); + if (! preg_match('/^[\pL\pM\pN_]+$/u', $this->prefix)) { + throw new ValidationFailed('The prefix may only contain characters and underscores.'); } if (strlen($this->prefix) > 10) {