From 3327f86ed2c0fa98fe98bde496b50c036b739210 Mon Sep 17 00:00:00 2001 From: Casey Watts Date: Tue, 13 Jun 2017 00:19:44 -0400 Subject: [PATCH 1/3] wfSetupSession is deprecated, so using \$session->persist() instead. See https://www.mediawiki.org/wiki/Manual:SessionManager_and_AuthManager/Updating_tips#Starting_a_session_.28wfSetupSession.28.29.29 --- CASAuth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CASAuth.php b/CASAuth.php index 6cac4ac..ec14fcf 100644 --- a/CASAuth.php +++ b/CASAuth.php @@ -281,7 +281,8 @@ function casSetup() { global $casIsSetUp; // Make the session persistent so that phpCAS doesn't change the session id - wfSetupSession(); + $session = MediaWiki\Session\SessionManager::getGlobalSession(); + $session->persist(); require_once($CASAuth["phpCAS"]."/CAS.php"); phpCAS::client($CASAuth["Version"], $CASAuth["Server"], $CASAuth["Port"], $CASAuth["Url"], false); From 68b6c42acce9bc87964b39268098e5b051f46bda Mon Sep 17 00:00:00 2001 From: Casey Watts Date: Tue, 13 Jun 2017 00:22:37 -0400 Subject: [PATCH 2/3] remove action=purge from post-login screen, because now it makes the user click a button to confirm a purge, and users won't like that --- CASAuth.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CASAuth.php b/CASAuth.php index ec14fcf..03a1e0b 100644 --- a/CASAuth.php +++ b/CASAuth.php @@ -156,8 +156,7 @@ function casLogin($user) { if ($returnto) { $target = Title::newFromText($returnto); if ($target) { - //action=purge is used to purge the cache - $wgOut->redirect($target->getFullUrl('action=purge')); + $wgOut->redirect($target->getFullUrl()); } } } From 4cefdfdf9ff869fc0a37056d3d0ab44e41ba4acf Mon Sep 17 00:00:00 2001 From: Casey Watts Date: Tue, 13 Jun 2017 00:55:42 -0400 Subject: [PATCH 3/3] add in path to use jasig/phpcas via composer --- CASAuthSettings.php.template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CASAuthSettings.php.template b/CASAuthSettings.php.template index d955a1a..fd6465e 100644 --- a/CASAuthSettings.php.template +++ b/CASAuthSettings.php.template @@ -9,6 +9,8 @@ # information. # # Default: $CASAuth["phpCAS"]="$IP/extensions/CASAuth/CAS"; +# via composer: $CASAuth["phpCAS"]="$IP/vendor/jasig/phpcas"; + $CASAuth["phpCAS"]="$IP/extensions/CASAuth/CAS"; # Location of the CAS authentication server. You must set this to the location