From: Victor Vasiliev Date: Mon, 4 Jun 2012 23:30:33 +0000 (+0200) Subject: (bug 37330) Fix wrong block being displayed due to autoblock in place. X-Git-Tag: 1.31.0-rc.0~23259^2~4 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=dac90fa456287c26aedb422d9aa6b743dcbc1a4a;p=lhc%2Fweb%2Fwiklou.git (bug 37330) Fix wrong block being displayed due to autoblock in place. Autoblocks triggered latest block log entry being displayed, which was naturally the wrong one, since autoblocks are not put into a block log. Change-Id: Ic08880c18a778d5294bb934c764a70dbd7800b70 --- diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 1b7494f6de..62b34ad38b 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -235,7 +235,9 @@ class SpecialContributions extends SpecialPage { $links = $this->getLanguage()->pipeList( $tools ); // Show a note if the user is blocked and display the last block log entry. - if ( $userObj->isBlocked() ) { + // Do not expose the autoblocks, since that may lead to a leak of accounts' IPs, + // and also this will display a totally irrelevant log entry as a current block. + if ( $userObj->isBlocked() && $userObj->getBlock()->getType() != Block::TYPE_AUTO ) { $out = $this->getOutput(); // showLogExtract() wants first parameter by reference LogEventsList::showLogExtract( $out,