Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-26257 Shibboleth auth: run logout handler only if logged in via S…

…hibboleth
  • Loading branch information...
commit 033a066e4f72161541b7a6b2fdafd9a83e7d6937 1 parent 22e8ad6
Henning Bostelmann authored

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. 8  auth/shibboleth/auth.php
8  auth/shibboleth/auth.php
@@ -193,11 +193,11 @@ function loginpage_hook() {
193 193
      *
194 194
      */
195 195
     function logoutpage_hook() {
196  
-        global $redirect;
  196
+        global $SESSION, $redirect;
197 197
 
198  
-        // Only do this if logout handler is defined
199  
-        if (
200  
-              isset($this->config->logout_handler)
  198
+        // Only do this if logout handler is defined, and if the user is actually logged in via Shibboleth
  199
+        if (  isset($SESSION->shibboleth_session_id)
  200
+              && isset($this->config->logout_handler)
201 201
               && !empty($this->config->logout_handler)
202 202
            ){
203 203
             // Check if there is an alternative logout return url defined

0 notes on commit 033a066

Please sign in to comment.
Something went wrong with that request. Please try again.