wiki.techinc.nl/tests/phpunit/includes/api/query
Brad Jorsch 087e25021b API: Warn when input parameters are normalized
If a client submits data that is not NFC-normalized Unicode or that
contains C0 controls other than HT, LF, and CR, it gets normalized before
the API ever sees it. Which can lead to difficult-to-handle bugs when,
for example, a title is subject to normalization so the client can't
find the specific title it submitted anywhere in the response (T139130).

This patch does two things:
* Detects when normalization was applied to an input value (at the
  MediaWiki level, anyway; if PHP or earlier does it we're just out of
  luck) and add a warning to that effect.
* For ApiPageSet's 'titles' parameter, split into the individual titles
  and add them to the 'normalized' list in the response. This requires
  encoding the pre-normalized strings to avoid ApiResult's own
  normalization.

Bug: T29849
Bug: T144071
Change-Id: I215fd3edd7a5e1b45292e60768bf6dd5ad7f34de
2016-08-29 15:00:45 +00:00
..
ApiQueryBasicTest.php Avoid rebuilding database fixtures for every test run 2016-03-10 23:44:34 +00:00
ApiQueryContinue2Test.php Avoid rebuilding database fixtures for every test run 2016-03-10 23:44:34 +00:00
ApiQueryContinueTest.php Avoid rebuilding database fixtures for every test run 2016-03-10 23:44:34 +00:00
ApiQueryContinueTestBase.php Convert all array() syntax to [] 2016-02-17 01:33:00 -08:00
ApiQueryRevisionsTest.php Convert all array() syntax to [] 2016-02-17 01:33:00 -08:00
ApiQueryTest.php API: Warn when input parameters are normalized 2016-08-29 15:00:45 +00:00
ApiQueryTestBase.php Convert all array() syntax to [] 2016-02-17 01:33:00 -08:00