Skip to content

Commit a3d2901

Browse files
committed
Ignore non-logged in saml requests
Signed-off-by: Joas Schilling <[email protected]>
1 parent ac527dd commit a3d2901

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/AppInfo/Application.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,13 @@ public function register() {
4545

4646
Util::connectHook('OC_Filesystem', 'preSetup', $this, 'addStorageWrapper');
4747

48-
$request = $this->getContainer()->getServer()->getRequest();
49-
if (!\OC::$CLI && strpos($request->getPathInfo(), '/login') !== 0
48+
// Only display the app on index.php except for public shares
49+
$server = $this->getContainer()->getServer();
50+
$request = $server->getRequest();
51+
if (!\OC::$CLI
52+
&& $server->getUserSession()->getUser() !== null
53+
&& strpos($request->getPathInfo(), '/s/') !== 0
54+
&& strpos($request->getPathInfo(), '/login/') !== 0
5055
&& substr($request->getScriptName(), 0 - \strlen('/index.php')) === '/index.php') {
5156
Util::addStyle('terms_of_service', 'overlay');
5257
Util::addScript('terms_of_service', 'terms_of_service_user');

0 commit comments

Comments
 (0)