diff --git a/lib/AppWhitelist.php b/lib/AppWhitelist.php index 7fc2f9a4..e95be513 100644 --- a/lib/AppWhitelist.php +++ b/lib/AppWhitelist.php @@ -77,10 +77,13 @@ public function isUrlAllowed(IUser $user, string|false $url): bool { } public function verifyAccess(IUser $user, IRequest $request): void { - if (!$this->isUrlAllowed($user, $request->getPathInfo())) { + $url = $request->getPathInfo(); + $app = $this->getRequestedApp($url); + + if (!$this->isUrlAllowed($user, $url)) { header('HTTP/1.0 403 Forbidden'); Template::printErrorPage($this->l10n->t( - 'Access to this resource is forbidden for guests.' + "Access to this resource ($app) is forbidden for guests." )); exit; }