Page MenuHomePhabricator
Authored By
Huji
Nov 28 2018, 1:19 AM
Size
2 KB
Referenced Files
None
Subscribers
None

T210329.patch

From 9842279428d955a0a1409b4a66061f9a9fe77a1c Mon Sep 17 00:00:00 2001
From: Huji Lee <huji.huji@gmail.com>
Date: Sat, 24 Nov 2018 20:16:05 -0500
Subject: Remove private information from the API results for GET queries
Later, we will add a new POST request which will allow retrieving
the private details; it will have a mandatory "reason" parameter,
and will result in a log entry in the private details access log,
just like the web interface.
Change-Id: Iaca492371f48fecf543268c179a651841ed12c3f
---
includes/api/ApiQueryAbuseLog.php | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/includes/api/ApiQueryAbuseLog.php b/includes/api/ApiQueryAbuseLog.php
index 5ddc8ccb..95ea8679 100644
--- a/includes/api/ApiQueryAbuseLog.php
+++ b/includes/api/ApiQueryAbuseLog.php
@@ -56,7 +56,6 @@ class ApiQueryAbuseLog extends ApiQueryBase {
$fld_ids = isset( $prop['ids'] );
$fld_filter = isset( $prop['filter'] );
$fld_user = isset( $prop['user'] );
- $fld_ip = isset( $prop['ip'] );
$fld_title = isset( $prop['title'] );
$fld_action = isset( $prop['action'] );
$fld_details = isset( $prop['details'] );
@@ -67,9 +66,6 @@ class ApiQueryAbuseLog extends ApiQueryBase {
$isCentral = $this->getConfig()->get( 'AbuseFilterIsCentral' );
$fld_wiki = $isCentral && isset( $prop['wiki'] );
- if ( $fld_ip ) {
- $this->checkUserRightsAny( 'abusefilter-private' );
- }
if ( $fld_details ) {
$this->checkUserRightsAny( 'abusefilter-log-detail' );
}
@@ -99,7 +95,6 @@ class ApiQueryAbuseLog extends ApiQueryBase {
$this->addFields( 'afl_filter' );
$this->addFieldsIf( 'afl_id', $fld_ids );
$this->addFieldsIf( 'afl_user_text', $fld_user );
- $this->addFieldsIf( 'afl_ip', $fld_ip );
$this->addFieldsIf( [ 'afl_namespace', 'afl_title' ], $fld_title );
$this->addFieldsIf( 'afl_action', $fld_action );
$this->addFieldsIf( 'afl_var_dump', $fld_details );
@@ -199,9 +194,6 @@ class ApiQueryAbuseLog extends ApiQueryBase {
if ( $fld_user ) {
$entry['user'] = $row->afl_user_text;
}
- if ( $fld_ip ) {
- $entry['ip'] = $row->afl_ip;
- }
if ( $fld_wiki ) {
$entry['wiki'] = $row->afl_wiki;
}
@@ -292,7 +284,6 @@ class ApiQueryAbuseLog extends ApiQueryBase {
'ids',
'filter',
'user',
- 'ip',
'title',
'action',
'details',
--
2.17.1

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6739133
Default Alt Text
T210329.patch (2 KB)

Event Timeline