From a65488000c02d47726a1a981c19e592e7159359c 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 --- src/Install/DatabaseConfig.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Install/DatabaseConfig.php b/src/Install/DatabaseConfig.php index 89ac46ed5..0fb350a7c 100644 --- a/src/Install/DatabaseConfig.php +++ b/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) {