r22648 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22647‎ | r22648 | r22649 >
Date:03:47, 2 June 2007
Author:yurik
Status:old
Tags:
Comment:
API: Security update - deleted rev/rc/log entries are no longer shown.
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryLogEvents.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryRecentChanges.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUserContributions.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php
@@ -51,6 +51,7 @@
5252 $this->addTables('recentchanges');
5353 $this->addWhereRange('rc_timestamp', $dir, $start, $end);
5454 $this->addWhereFld('rc_namespace', $namespace);
 55+ $this->addWhereFld('rc_deleted', 0);
5556
5657 if (!is_null($show)) {
5758 $show = array_flip($show);
Index: trunk/phase3/includes/api/ApiQueryWatchlist.php
@@ -125,8 +125,10 @@
126126 'wl_namespace = rc_namespace',
127127 'wl_title = rc_title',
128128 'rc_cur_id = page_id',
129 - 'wl_user' => $userId
 129+ 'wl_user' => $userId,
 130+ 'rc_deleted' => 0,
130131 ));
 132+
131133 $this->addWhereRange('rc_timestamp', $dir, $start, $end);
132134 $this->addWhereFld('wl_namespace', $namespace);
133135 $this->addWhereIf('rc_this_oldid=page_latest', !$allrev);
Index: trunk/phase3/includes/api/ApiQueryUserContributions.php
@@ -129,6 +129,8 @@
130130 list ($tbl_page, $tbl_revision) = $this->getDB()->tableNamesN('page', 'revision');
131131 $this->addTables("$tbl_revision LEFT OUTER JOIN $tbl_page ON page_id=rev_page");
132132
 133+ $this->addWhereFld('rev_deleted', 0);
 134+
133135 // We only want pages by the specified user.
134136 $this->addWhereFld('rev_user_text', $this->userTitle->getText());
135137
Index: trunk/phase3/includes/api/ApiQueryLogEvents.php
@@ -65,6 +65,7 @@
6666 'log_params'
6767 ));
6868
 69+ $this->addWhereFld('log_deleted', 0);
6970 $this->addWhereFld('log_type', $type);
7071 $this->addWhereRange('log_timestamp', $dir, $start, $end);
7172 $this->addOption('LIMIT', $limit +1);

Follow-up revisions

RevisionCommit summaryAuthorDate
r22652Merged revisions 22619-22651 via svnmerge from...david06:10, 2 June 2007