From f63eb4261fd3f7591774b12a08a5e83d41f4bf36 Mon Sep 17 00:00:00 2001 From: Mickey Knox Date: Wed, 2 Mar 2022 22:35:04 +0100 Subject: [PATCH] Fix permittedPath comparison Signed-off-by: Mickey Knox --- apps/settings/lib/Controller/CheckSetupController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php index 11900fad45b..52954d4193d 100644 --- a/apps/settings/lib/Controller/CheckSetupController.php +++ b/apps/settings/lib/Controller/CheckSetupController.php @@ -477,7 +477,7 @@ Raw output // Check whether Nextcloud is allowed to use the OPcache API $isPermitted = true; $permittedPath = $this->iniGetWrapper->getString('opcache.restrict_api'); - if (isset($permittedPath) && $permittedPath !== '' && !str_starts_with(\OC::$SERVERROOT, $permittedPath)) { + if (isset($permittedPath) && $permittedPath !== '' && !str_starts_with(\OC::$SERVERROOT, rtrim($permittedPath, '/'))) { $isPermitted = false; } -- 2.39.5