From: Mickey Knox Date: Wed, 2 Mar 2022 21:35:04 +0000 (+0100) Subject: Fix permittedPath comparison X-Git-Tag: v24.0.0beta1~125^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F31415%2Fhead;p=nextcloud-server.git Fix permittedPath comparison Signed-off-by: Mickey Knox --- 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; }