From a5ea966feb5d20026eda6aa98ab2db9c9802c012 Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Sun, 16 Dec 2007 08:59:47 +0000 Subject: [PATCH] * (bug 12321) API list=blocks reveals private data --- RELEASE-NOTES | 1 + includes/api/ApiQueryBlocks.php | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 784b1e729f..a2468f44a9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -360,6 +360,7 @@ Full API documentation is available at http://www.mediawiki.org/wiki/API * Standardized limits. Revisions and Deletedrevisions formerly using 200 / 10000, now 500 / 5000, in line with other modules. * Added list=allcategories module +* (bug 12321) API list=blocks reveals private data === Languages updated in 1.12 === diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index 8f5536888a..05959575a9 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -112,15 +112,13 @@ class ApiQueryBlocks extends ApiQueryBase { $block = array(); if($fld_id) $block['id'] = $row->ipb_id; - if($fld_user) + if($fld_user && !$row->ipb_auto) { $block['user'] = $row->ipb_address; - $block['userid'] = $row->ipb_user; } if($fld_by) { $block['by'] = $row->user_name; - $block['byuserid'] = $row->ipb_by; } if($fld_timestamp) $block['timestamp'] = wfTimestamp(TS_ISO_8601, $row->ipb_timestamp); -- 2.20.1