SECURITY: Don't disclose if an IP is autoblocked on Special:DeletedContributions
authorKunal Mehta <legoktm@gmail.com>
Fri, 24 Jul 2015 21:23:46 +0000 (14:23 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Tue, 11 Aug 2015 14:17:30 +0000 (07:17 -0700)
Same patch as dc2966bd05b, just for Special:DeletedContributions this
time.

Bug: T106893
Change-Id: I2089b21fc379b612fe9bf087b5f4ea75052bdbd3

includes/specials/SpecialDeletedContributions.php

index 8c7f0c8..44352a7 100644 (file)
@@ -477,7 +477,7 @@ class DeletedContributionsPage extends SpecialPage {
                        if ( ( $id !== null ) || ( $id === null && IP::isIPAddress( $nt->getText() ) ) ) {
                                # Block / Change block / Unblock links
                                if ( $this->getUser()->isAllowed( 'block' ) ) {
-                                       if ( $userObj->isBlocked() ) {
+                                       if ( $userObj->isBlocked() && $userObj->getBlock()->getType() !== Block::TYPE_AUTO ) {
                                                $tools[] = Linker::linkKnown( # Change block link
                                                        SpecialPage::getTitleFor( 'Block', $nt->getDBkey() ),
                                                        $this->msg( 'change-blocklink' )->escaped()