Skip to content

Commit 2c773a8

Browse files
committed
fix: detect files app in guest whitelist checking
1 parent fa57213 commit 2c773a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/AppWhitelist.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static function preSetup($params) {
4949
$app = self::getRequestedApp($path);
5050
$whitelist = self::getWhitelist();
5151

52-
if (!\in_array($app, $whitelist)) {
52+
if (!\in_array($app, $whitelist, true)) {
5353
\header('HTTP/1.0 403 Forbidden');
5454
$l = \OC::$server->getL10NFactory()->get('guests');
5555
Template::printErrorPage($l->t(
@@ -90,6 +90,8 @@ private static function getRequestedApp($url) {
9090
return 'heartbeat';
9191
} elseif (\substr($url, 0, 13) === '/dav/comments') {
9292
return 'comments';
93+
} elseif (\substr($url, 0, 11) === '/dav/files/') {
94+
return 'files';
9395
}
9496
return false;
9597
}

0 commit comments

Comments
 (0)