ApiQuery iwurl conflicts with prop=iwlinks iwurl
Open, LowestPublic

Description

Consider, for example, the following queries. These unexpectedly return different results. The first produces a warning and gives interwiki results, while the other two produce a warning and an error, giving no results at all. In all of these cases, both the warning and the error are inappropriate if we consider that the iwurl parameter was targeted towards ApiQuery.

https://en.wikipedia.org/w/api.php?action=query&iwurl=&titles=fr:Albert%20Einstein&prop=iwlinks&iwprop=url
https://en.wikipedia.org/w/api.php?action=query&iwurl=&titles=Albert%20Einstein&prop=iwlinks&iwprop=url
https://en.wikipedia.org/w/api.php?action=query&iwurl=&titles=fr:Albert%20Einstein|Albert%20Einstein&prop=iwlinks&iwprop=url

This is definitely an edge (corner?) case, but conceivably, a bot might be provided an arbitrary list of titles such as the above and then try to run this type of query on them. Given that iwlinks' iwurl parameter is already deprecated, perhaps it would be best to remove it sooner rather than later.

RobinHood70 updated the task description. (Show Details)
RobinHood70 raised the priority of this task from to Lowest.
RobinHood70 added a project: MediaWiki-API.
RobinHood70 added a subscriber: RobinHood70.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 15 2015, 5:50 AM
Anomie added a subscriber: Anomie.Oct 15 2015, 3:46 PM

I don't see a problem with doing this. Looking through feature usage logs over the past month, it appears there are only two things hitting this:

The first should be easy enough to fix. For the second, someone could drop an email to the address on the contact page of that site.

Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.Oct 15 2015, 3:46 PM
jayvdb added a subscriber: jayvdb.Oct 15 2015, 7:34 PM