Skip to content

Commit

Permalink
Fix permittedPath comparison
Browse files Browse the repository at this point in the history
Signed-off-by: Mickey Knox <mickey@netfreaks.org>
  • Loading branch information
Mickey Knox authored and szaimen committed Mar 8, 2022
1 parent 3686021 commit 4910724
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/settings/lib/Controller/CheckSetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ protected function getOpcacheSetupRecommendations(): array {
// 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;
}

Expand Down

0 comments on commit 4910724

Please sign in to comment.