Avoid mangling fields in API continuation parameters
authorBrad Jorsch <anomie.wikipedia@gmail.com>
Mon, 21 May 2012 17:07:37 +0000 (13:07 -0400)
committerCatrope <roan.kattouw@gmail.com>
Tue, 17 Jul 2012 23:08:39 +0000 (16:08 -0700)
commit2b3f4d821cd41fe3002e1cce15169d5b5700f7d8
tree1cc0f47020c18ccf427a25215c1b8b6198738ad6
parent93867817063fd90be74dcdc5cc43e53f03015a55
Avoid mangling fields in API continuation parameters

API continuation parameters encode sufficient state for a subsequent
query to continue where the previous one left off; this may sometimes
include page titles, with or without the namespace. Given that these
page titles are already in the exact format required for the next
request's SQL query, it is not necessary to "normalize" them in any way.
And if normalization does more than just change spaces to underscores or
vice versa (e.g. it canonicalizes namespace aliases or capitalizes the
first letter of the title), it can be actively harmful: see bug 36987
and bug 29290.

Note this patch involves a breaking API change: the values for the
"continue" parameter of various modules have been changed, and some
modules will now return "continue" as the continuation parameter instead
of reusing "from".

Note this patch also corrects a minor logic bug in ApiQueryAllLinks,
changing ">" to ">=". The line is being changed anyway, so I didn't
bother doing a separate changeset.

Change-Id: I459232e919d20f89f6de9d20640fd48c8fd5781c
15 files changed:
RELEASE-NOTES-1.20
includes/api/ApiQueryAllCategories.php
includes/api/ApiQueryAllImages.php
includes/api/ApiQueryAllLinks.php
includes/api/ApiQueryAllPages.php
includes/api/ApiQueryCategories.php
includes/api/ApiQueryDeletedrevs.php
includes/api/ApiQueryDuplicateFiles.php
includes/api/ApiQueryFilearchive.php
includes/api/ApiQueryIWBacklinks.php
includes/api/ApiQueryIWLinks.php
includes/api/ApiQueryImages.php
includes/api/ApiQueryLangBacklinks.php
includes/api/ApiQueryLinks.php
includes/api/ApiQueryWatchlistRaw.php