Page MenuHomePhabricator

0001-SECURITY-Don-t-disclose-if-an-IP-is-autoblocked-on-S.patch

Authored By
Legoktm
Jul 24 2015, 9:24 PM
Size
1 KB
Referenced Files
None
Subscribers
None

0001-SECURITY-Don-t-disclose-if-an-IP-is-autoblocked-on-S.patch

From d9c6f75b702b5567abaaa9eb78c9439d9a92a4e5 Mon Sep 17 00:00:00 2001
From: Kunal Mehta <legoktm@gmail.com>
Date: Fri, 24 Jul 2015 14:23:46 -0700
Subject: [PATCH] SECURITY: Don't disclose if an IP is autoblocked on
Special:DeletedContributions
Same patch as dc2966bd05b, just for Special:DeletedContributions this
time.
Bug: T106893
Change-Id: I2089b21fc379b612fe9bf087b5f4ea75052bdbd3
---
includes/specials/SpecialDeletedContributions.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php
index 8c7f0c8..44352a7 100644
--- a/includes/specials/SpecialDeletedContributions.php
+++ b/includes/specials/SpecialDeletedContributions.php
@@ -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()
--
2.4.3

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
240304
Default Alt Text
0001-SECURITY-Don-t-disclose-if-an-IP-is-autoblocked-on-S.patch (1 KB)

Event Timeline