Page MenuHomePhabricator

Special:UnreviewedPages, when filtering by category, is broken on wikis using UCA category collations
Open, Needs TriagePublic

Description

When filtering by category, Special:UnreviewedPages, in the "next" pagination link, includes the sort key for the last title on the page as a URL encoded binary string. Because MediaWiki validates the UTF-8 sequences in, filters out certain characters from, and applies NFC normalization to all GET/POST values arriving at the web interface, this does not work correctly.

Steps to reproduce:

  1. Install FlaggedRevs.
  2. Add your user account to a group that has permission to use the special page. By default, the "editor" and "reviewer" groups have permission.
  3. In LocalSettings.php, set $wgCategoryCollation to "uca-en", then run maintenance/updateCollation.php --force.
  4. Create "Collate test page A" and "Collate test page B" with content [[Category:Collate test category]]. Unaccept the revisions if necessary.
  5. Go to Special:UnreviewedPages.
  6. Enter "Collate test category" in the "Category:" box, then click "Go".
  7. Add &limit=1 to the URL.
  8. Click "next 1".

Actual result: Immediately after step 7, and immediately after step 8, only "Collate test page A" is listed.

Expected result: Immediately after step 7, only "Collate test page A" is listed. Immediately after step 8, only "Collate test page B" is listed.