From cea006c58f83c9585998ea34e4ddf3d61d858342 Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 17 Oct 2023 11:22:07 +0200 Subject: [PATCH] fix regex for additional backup dirs Signed-off-by: Simon L --- php/src/Data/ConfigurationManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 5bb295b5..5fba6fa8 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -729,7 +729,7 @@ class ConfigurationManager // Trim all unwanted chars on both sites $entry = trim($entry); if ($entry !== "") { - if (!preg_match("#^/[.0-1a-zA-Z/-_]+$#", $entry) && !preg_match("#^[.0-1a-zA-Z_-]+$#", $entry)) { + if (!preg_match("#^/[.0-1a-zA-Z/_-]+$#", $entry) && !preg_match("#^[.0-1a-zA-Z_-]+$#", $entry)) { throw new InvalidSettingConfigurationException("You entered unallowed characters! Problematic is " . $entry); } $validDirectories .= rtrim($entry, '/') . PHP_EOL;