diff options
author | Jorge López Pérez <jorge@adobo.org> | 2014-07-30 15:40:46 +0400 |
---|---|---|
committer | Jorge López Pérez <jorge@adobo.org> | 2014-07-30 15:40:46 +0400 |
commit | 5bd7aeea4c0c54fa02b88443779e2c7a0c9ec43c (patch) | |
tree | e854a379fc6524e756a953bb80b7e4f68e0faa86 /user_saml | |
parent | 8dc2502cc0f5f65f2e99ac79b56b6911ed0e7839 (diff) |
Fix script name detection
Fixes the name detection when login enforcement is set. Works even when
ownCloud is installed on a subdirectory
Diffstat (limited to 'user_saml')
-rw-r--r-- | user_saml/appinfo/app.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/user_saml/appinfo/app.php b/user_saml/appinfo/app.php index b8d26bf0a..9b79806fb 100644 --- a/user_saml/appinfo/app.php +++ b/user_saml/appinfo/app.php @@ -88,11 +88,8 @@ function shouldEnforceAuthentication() return false; } - $url = OCP\Util::getRequestUri(); - $url_pieces = preg_split('/[\/?]/', $uri); - - return !isset($url_pieces[0]) || !in_array( - $url_pieces[0], + $script = basename($_SERVER['SCRIPT_FILENAME']); + return !in_array($script, array( 'cron.php', 'public.php', |