* (T215169) Fix for Database::update() with IGNORE option fails on PostgreSQL.
* (T204423) Backport support for hyphenated DB names in JobQueueGroup.
* (T199474) Fix typo in rebuildrecentchanges.php resulting in rogue flags.
+* (T218608) Fix an issue that prevents Extension:OAuth working when
+ $wgBlockDisablesLogin is true.
== MediaWiki 1.31.1 ==
# user is not immune to autoblocks/hardblocks, and they are the current user so we
# know which IP address they're actually coming from
$ip = null;
- if ( !$this->isAllowed( 'ipblock-exempt' ) ) {
- $sessionUser = RequestContext::getMain()->getUser();
- // the session user is set up towards the end of Setup.php. Until then,
- // assume it's a logged-out user.
- $globalUserName = $sessionUser->isSafeToLoad()
- ? $sessionUser->getName()
- : IP::sanitizeIP( $sessionUser->getRequest()->getIP() );
- if ( $this->getName() === $globalUserName ) {
- $ip = $this->getRequest()->getIP();
- }
+ $sessionUser = RequestContext::getMain()->getUser();
+ // the session user is set up towards the end of Setup.php. Until then,
+ // assume it's a logged-out user.
+ $globalUserName = $sessionUser->isSafeToLoad()
+ ? $sessionUser->getName()
+ : IP::sanitizeIP( $sessionUser->getRequest()->getIP() );
+ if ( $this->getName() === $globalUserName && !$this->isAllowed( 'ipblock-exempt' ) ) {
+ $ip = $this->getRequest()->getIP();
}
// User/IP blocking