Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F11551
bug54294.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 22 2014, 1:58 AM
2014-11-22 01:58:59 (UTC+0)
Size
2 KB
Referenced Files
None
Subscribers
None
bug54294.patch
View Options
From 82f745e310ee426db35d457ff851da70d5961630 Mon Sep 17 00:00:00 2001
From: csteipp <csteipp@wikimedia.org>
Date: Tue, 24 Sep 2013 08:36:46 -0700
Subject: [PATCH] SECURITY: Don't show deleted usernames
Remove the username and javascript links
Bug: 54294
---
CleanChanges_body.php | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)
diff --git a/CleanChanges_body.php b/CleanChanges_body.php
index 5f339cc..d5ef60a 100644
--- a/CleanChanges_body.php
+++ b/CleanChanges_body.php
@@ -156,13 +156,24 @@ class NCL extends EnhancedChangesList {
$rc->_reqOldId = array( 'oldid' => $rc->getAttribute( 'rc_this_oldid' ) );
$this->makeLinks( $rc );
- $stuff = $this->userToolLinks( $rc->getAttribute( 'rc_user' ),
- $rc->getAttribute( 'rc_user_text' ) );
- self::$userinfo += $stuff[1];
-
- $rc->_user = Linker::userLink( $rc->getAttribute( 'rc_user' ),
- $rc->getAttribute( 'rc_user_text' ) );
- $rc->_userInfo = $stuff[0];
+ // Make user links
+ if ( $this->isDeleted( $rc, Revision::DELETED_USER ) ) {
+ $rc->_user = ' <span class="history-deleted">' . $this->msg( 'rev-deleted-user' )->escaped() . '</span>';
+ $rc->_userInfo = '';
+ self::$userinfo += array();
+ } else {
+ $rc->_user = Linker::userLink(
+ $rc->getAttribute( 'rc_user' ),
+ $rc->getAttribute( 'rc_user_text' )
+ );
+ $stuff = $this->userToolLinks(
+ $rc->getAttribute( 'rc_user' ),
+ $rc->getAttribute( 'rc_user_text' )
+ );
+ // TODO: userToolLinks can return ''
+ self::$userinfo += $stuff[1];
+ $rc->_userInfo = $stuff[0];
+ }
if ( !$this->isLog( $rc ) ) {
$rc->_comment = $this->getComment( $rc );
@@ -444,6 +455,11 @@ class NCL extends EnhancedChangesList {
/**
* Enhanced user tool links, with javascript functionality.
+ * @param int $userId user id, 0 for anons
+ * @param string $userText username
+ * @return array|string Either an array of html and array of messages, or ''
+ * [0]: html span and links to user tools
+ * [1]: array of escaped message strings
*/
public function userToolLinks( $userId, $userText ) {
global $wgDisableAnonTalk;
--
1.8.1.4
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
11014
Default Alt Text
bug54294.patch (2 KB)
Attached To
Mode
T56294: Oversighted IP still visible on Recent Changes when using when grouping edits per page
Attached
Detach File
Event Timeline
Log In to Comment