Page MenuHomePhabricator

rcnamespace=* does not include negative namespaces
Closed, ResolvedPublic


Making an API call containing rcnamespace=* to get all namespaces does not include negative namespaces, like -1 for Special pages. For the most part, log actions do not take place in any negative namespace, however, logtype=abusefilter actually does. This is probably why it's taken so long for anyone to discover this.

To reproduce this, simply make an edit to an AbuseFilter, and then make two api calls. First something like /w/api.php?action=query&format=jsonfm&list=recentchanges&rcprop=title%7Cuser%7Cparsedcomment%7Cloginfo&rcshow=!bot&rclimit=20&rctype=log and then something like /w/api.php?action=query&format=jsonfm&list=recentchanges&rcnamespace=*&rcprop=title%7Cuser%7Cparsedcomment%7Cloginfo&rcshow=!bot&rclimit=20&rctype=log

The first result should contain the AbuseFilter edit, and in the second one it is mysteriously elided.


Related Gerrit Patches:

Event Timeline

Nirmos created this task.Dec 30 2016, 1:33 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 30 2016, 1:33 PM
Anomie added a subscriber: Anomie.Dec 30 2016, 2:25 PM

Other modules probably have the same issue. In a quick search,

  • ApiQueryLogEvents
  • ApiQueryLinks – we don't currently record wikilinks to Special pages (see T19597) but it wouldn't hurt to support it in case we start to, and we do need it for prop=templates
  • ApiQueryAllLinks – for templates and redirects

Similar issues:

  • ApiQueryBacklinks – doesn't accept tititle=Special:Foo
  • ApiQueryBacklinksprop – ignores Special pages from titles
Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.Dec 30 2016, 2:25 PM
Anomie claimed this task.Jan 6 2017, 6:10 PM
Anomie moved this task from Needs Code to Needs Review on the MediaWiki-API board.

Change 330961 had a related patch set uploaded (by Anomie):
API: Allow finding log events and links to special pages

Change 330961 merged by jenkins-bot:
API: Allow finding log events and links to special pages

Anomie closed this task as Resolved.Jan 7 2017, 4:48 PM