Page MenuHomePhabricator

Usercontribs API returning results for a different user
Closed, ResolvedPublic

Description

https://en.wikipedia.org/w/api.php?action=query&list=usercontribs&ucuser=1989&ucprop=timestamp&uclimit=1 is supposed to return the timestamp of the last edit made by User:1989 (they've made some 37,000+ edits), but instead it returns a result for User:1989zay. It also took a full minute to get a response. Other APIs such as list=users and list=allusers appear to be working properly.

This bug was discovered because I have a bot that finds users listed at Wikipedia:AutoWikiBrowser/CheckPage that haven't edited in over a year. User:1989 has been on this list for years, so I assume the bug is recent regression (past week) or else the bot would have reported them before.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Completely unrelated: I was searching for a duplicate bug with https://phabricator.wikimedia.org/search/query/0LHQNrVX13XI/#R, and the results include a closed task even though I have it filtered to only show open tasks. This might require an upstream bug report, and I don't have an account there.

Completely unrelated:

[OT] Please comment on/reopen T157783; this is not upstream. (Plus cannot reproduce on https://phabricator.wikimedia.org/maniphest/query/0.3KI7G.FYrr/#R )

Change 558050 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] ApiQueryUserContribs: Stringify user names in query

https://gerrit.wikimedia.org/r/558050

Change 558050 merged by jenkins-bot:
[mediawiki/core@master] ApiQueryUserContribs: Stringify user names in query

https://gerrit.wikimedia.org/r/558050

Change 558124 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@wmf/1.35.0-wmf.10] ApiQueryUserContribs: Stringify user names in query

https://gerrit.wikimedia.org/r/558124

Change 558124 merged by jenkins-bot:
[mediawiki/core@wmf/1.35.0-wmf.10] ApiQueryUserContribs: Stringify user names in query

https://gerrit.wikimedia.org/r/558124

Mentioned in SAL (#wikimedia-operations) [2019-12-16T17:22:10Z] <anomie@deploy1001> Synchronized php-1.35.0-wmf.10/includes/api/ApiQueryUserContribs.php: Backporting fix for T240808 (duration: 00m 59s)

Anomie claimed this task.
Anomie subscribed.

Fixed and backported to Wikimedia production.