mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-23 10:22:05 +00:00
ForeignWikiRequest: Also check User::isSafeToLoad()
Check it for both $wgUser and $this->user because they could theoretically be different. Bug: T139665 Change-Id: I59cb4f0122a9fccb32ca165fda065dee2467b1da
This commit is contained in:
parent
d27cab59d6
commit
83a181ce9c
|
@ -38,9 +38,11 @@ class EchoForeignWikiRequest {
|
|||
}
|
||||
|
||||
protected function canUseCentralAuthl() {
|
||||
global $wgFullyInitialised;
|
||||
global $wgFullyInitialised, $wgUser;
|
||||
|
||||
return $wgFullyInitialised &&
|
||||
$wgUser->isSafeToLoad() &&
|
||||
$this->user->isSafeToLoad() &&
|
||||
SessionManager::getGlobalSession()->getProvider() instanceof CentralAuthSessionProvider &&
|
||||
$this->getCentralId( $this->user ) !== 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue