jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index 7daed29..5672155 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: merged
Gerrit-Change-Id: Ieada914acdaf311658a160f0e4749baf579f40b9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits