Skip to content

Commit 4910724

Browse files
Mickey Knoxszaimen
authored andcommitted
Fix permittedPath comparison
Signed-off-by: Mickey Knox <mickey@netfreaks.org>
1 parent 3686021 commit 4910724

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/settings/lib/Controller/CheckSetupController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ protected function getOpcacheSetupRecommendations(): array {
482482
// Check whether Nextcloud is allowed to use the OPcache API
483483
$isPermitted = true;
484484
$permittedPath = $this->iniGetWrapper->getString('opcache.restrict_api');
485-
if (isset($permittedPath) && $permittedPath !== '' && !str_starts_with(\OC::$SERVERROOT, $permittedPath)) {
485+
if (isset($permittedPath) && $permittedPath !== '' && !str_starts_with(\OC::$SERVERROOT, rtrim($permittedPath, '/'))) {
486486
$isPermitted = false;
487487
}
488488

0 commit comments

Comments
 (0)