Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F32385740
T265606.patch
Urbanecm
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Urbanecm
Oct 15 2020, 2:17 PM
2020-10-15 14:17:14 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
T265606.patch
View Options
From 91c6590e129038cc5689e19a445fe9f3148bcbf1 Mon Sep 17 00:00:00 2001
From: Martin Urbanec <martin.urbanec@wikimedia.cz>
Date: Thu, 15 Oct 2020 16:15:20 +0200
Subject: [PATCH] Do not normalize empty targets in SpecialCheckuserLog
Bug: T265606
Change-Id: I75989f969682499831f80b54e41669309b4f7d13
---
includes/specials/SpecialCheckUserLog.php | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/includes/specials/SpecialCheckUserLog.php b/includes/specials/SpecialCheckUserLog.php
index 3a5c8cf..295eee7 100644
--- a/includes/specials/SpecialCheckUserLog.php
+++ b/includes/specials/SpecialCheckUserLog.php
@@ -31,14 +31,16 @@ class SpecialCheckUserLog extends SpecialPage {
$out = $this->getOutput();
$request = $this->getRequest();
- $this->target = trim( $request->getVal( 'cuSearch', $par ) );
$permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
// Normalise target parameter and ignore if not valid (T217713)
- // It must be valid when making a link to Special:CheckUser/<user>.
- $target = $request->getVal( 'cuSearch', $par );
- $userTitle = Title::makeTitleSafe( NS_USER, $target );
- $this->target = $userTitle ? $userTitle->getText() : null;
+ // It must be valid when making a link to Special:CheckUserLog/<user>.
+ // Do not normalize an empty target, as that means "everything" (T265606)
+ $this->target = trim( $request->getVal( 'cuSearch', $par ) );
+ if ( $this->target !== '' ) {
+ $userTitle = Title::makeTitleSafe( NS_USER, $this->target );
+ $this->target = $userTitle ? $userTitle->getText() : null;
+ }
if ( $permissionManager->userHasRight( $this->getUser(), 'checkuser' ) ) {
$subtitleLink = $this->getLinkRenderer()->makeKnownLink(
--
2.20.1
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8587739
Default Alt Text
T265606.patch (1 KB)
Attached To
Mode
T265606: CheckUserLog invisible on meta, mediawiki.org, wikidata, but visible on kowiki
Attached
Detach File
Event Timeline
Log In to Comment