From dac90fa456287c26aedb422d9aa6b743dcbc1a4a Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Tue, 5 Jun 2012 01:30:33 +0200 Subject: [PATCH] (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 --- includes/specials/SpecialContributions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- 2.20.1