Hoo man has uploaded a new change for review.
https://gerrit.wikimedia.org/r/166354
Change subject: Prevent PHP Notice in CentralAuthHooks::onUserLoadFromSession
......................................................................
Prevent PHP Notice in CentralAuthHooks::onUserLoadFromSession
Validate the data from CentralAuthUser::getSession() before using it.
This does not change functionality as those session are invalid anyway.
Change-Id: Ieada914acdaf311658a160f0e4749baf579f40b9
---
M includes/CentralAuthHooks.php
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth
refs/changes/54/166354/1
diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index 7daed29..640b2e7 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -725,9 +725,12 @@
if ( isset( $session['pending_name'] ) ||
isset( $session['pending_guid'] ) ) {
wfDebug( __METHOD__ . ": unintialized
session\n" );
return true;
- } else {
+ } elseif( isset( $session['token'] ) && isset(
$session['user'] ) ) {
$token = $session['token'];
$userName = $session['user'];
+ } else {
+ wfDebug( __METHOD__ . ": no token or
session\n" );
+ return true;
}
} else {
wfDebug( __METHOD__ . ": no token or session\n"
);
--
To view, visit https://gerrit.wikimedia.org/r/166354
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieada914acdaf311658a160f0e4749baf579f40b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits