summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-10-08 13:35:59 +0200
committerArthur Schiwon <blizzz@owncloud.com>2012-10-08 13:36:11 +0200
commit3affeb5bd77715c84c70230d744de8d0f577a378 (patch)
treeec154f9de825603f81b542e25bc22a69a06667af
parentf304ec14823e96d634e9085f7ad701666245484b (diff)
downloadnextcloud-server-3affeb5bd77715c84c70230d744de8d0f577a378.tar.gz
nextcloud-server-3affeb5bd77715c84c70230d744de8d0f577a378.zip
destroy invalid sessions
-rw-r--r--lib/base.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index 41ff1870059..c898273d9e2 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -352,6 +352,10 @@ class OC{
OC_User::useBackend(new OC_User_Database());
OC_Group::useBackend(new OC_Group_Database());
+ if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SESSION['user_id']) && $_SERVER['PHP_AUTH_USER'] != $_SESSION['user_id']) {
+ OC_User::logout();
+ }
+
// Load Apps
// This includes plugins for users and filesystems as well
global $RUNTIME_NOAPPS;