Skip to content

Commit

Permalink
Merge branch 'hotfix/1.4.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrupp committed Nov 9, 2017
2 parents 103b0fc + 4f4e84f commit 0f586dd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
9 changes: 8 additions & 1 deletion appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@
$app = new \OCA\UserCAS\AppInfo\Application();
$c = $app->getContainer();

if (\OCP\App::isEnabled($c->getAppName())) {
$enable = TRUE;

$script = $_SERVER['SCRIPT_FILENAME'];
if (in_array(basename($script), array('console.php', 'cron.php', 'public.php', 'remote.php', 'status.php', 'version.php')) || strpos($script, "/ocs")) {
$enable = FALSE;
}

if (\OCP\App::isEnabled($c->getAppName()) && !\OC::$CLI && $enable) {

$appService = $c->query('AppService');
$userService = $c->query('UserService');
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<licence>AGPL</licence>
<author>Felix Rupp, Leonis Holding, Sixto Martin</author>
<namespace>UserCAS</namespace>
<version>1.4.7</version>
<version>1.4.8</version>
<types>
<prelogin/>
<authentication/>
Expand Down
17 changes: 7 additions & 10 deletions lib/Service/AppService.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,13 @@ public function isEnforceAuthentication()
return FALSE;
}

$script = basename($_SERVER['SCRIPT_FILENAME']);
return !in_array(
$script,
array(
'cron.php',
'public.php',
'remote.php',
'status.php',
)
);

$script = $_SERVER['SCRIPT_FILENAME'];
if (in_array(basename($script), array('console.php', 'cron.php', 'public.php', 'remote.php', 'status.php', 'version.php')) || strpos($script, "/ocs")) {
return FALSE;
}

return TRUE;
}

/**
Expand Down

0 comments on commit 0f586dd

Please sign in to comment.