From 983e523bde3d24dc89de36185653c17f0d831bf5 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Thu, 3 Jul 2025 11:44:50 +0200 Subject: [PATCH] make the check for backup dir and datadir fail proof 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 5f950fc7..64542801 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -487,7 +487,7 @@ class ConfigurationManager throw new InvalidSettingConfigurationException("The path must start with '/', and must not end with '/'! Another option is to use the docker volume name 'nextcloud_aio_backupdir'."); } - if (str_starts_with($location, rtrim($this->GetNextcloudDatadirMount(), '/'))) { + if (str_starts_with($location . '/', rtrim($this->GetNextcloudDatadirMount(), '/') . '/')) { throw new InvalidSettingConfigurationException("The path must not be a children of or equal to NEXTCLOUD_DATADIR, which is currently set to " . $this->GetNextcloudDatadirMount()); }