diff --git a/extension.json b/extension.json index 38659b0..81859a1 100644 --- a/extension.json +++ b/extension.json @@ -3,7 +3,7 @@ "author": "ULYSSIS VZW, by Joachim Vandersmissen", "url": "https://docs.ulyssis.org/Securing_MediaWiki_using_Centrale_KU_Leuven_Login/", "description": "This extension replaces the vanilla login mechanics with a KU Leuven Shibboleth login", - "version": "1.3.2", + "version": "1.3.3", "license-name": "GPL-2.0+", "type": "other", "AutoloadNamespaces": { diff --git a/includes/bKULshib.php b/includes/bKULshib.php index c63ed34..e0917cb 100644 --- a/includes/bKULshib.php +++ b/includes/bKULshib.php @@ -69,7 +69,7 @@ function check_login() { } } - function login_link($returnlink = NULL, $force_ssl = TRUE) { + function login_link($returnlink = "", $force_ssl = TRUE) { //Voorbeeld loginlink: https://bert.ulyssis.be/Shibboleth.sso/WAYF/kuleuven?target=https%3A%2F%2Fbert.ulyssis.be%2Fshib%2Ftest.php if( ((isset($this->headers['HTTPS'])) AND ($this->headers['HTTPS'] == "on")) OR ($force_ssl) ) { @@ -90,7 +90,7 @@ function login_link($returnlink = NULL, $force_ssl = TRUE) { $return .= urlencode("http://") . urlencode($_SERVER['HTTP_HOST']); } - if($returnlink == NULL) { + if($returnlink == "") { return $return . urlencode($_SERVER['REQUEST_URI']); } elseif(strpos($returnlink, "/") === 0) { @@ -102,7 +102,7 @@ function login_link($returnlink = NULL, $force_ssl = TRUE) { } } - function logout_link($displaylink = NULL, $force_ssl = TRUE) { + function logout_link($displaylink = "", $force_ssl = TRUE) { //Voorbeeld logoutlink, volwaardige logout bij IdP, geen redirect: https://bert.ulyssis.be/Shibboleth.sso/Logout?return=https%3A%2F%2Fidp.kuleuven.be%2Fidp%2Flogout%3Freturn%3Dhttps%3A%2F%2Fbert.ulyssis.be%2Findex.php if( ((isset($this->headers['HTTPS'])) AND ($this->headers['HTTPS'] == "on")) OR ($force_ssl) ) { @@ -123,7 +123,7 @@ function logout_link($displaylink = NULL, $force_ssl = TRUE) { $return .= urlencode("http://") . urlencode($_SERVER['HTTP_HOST']); } - if($displaylink == NULL) { + if($displaylink == "") { return $return . urlencode($_SERVER['REQUEST_URI']); } elseif(strpos($displaylink, "/") === 0) {