Normalisation of namespace on User contribs is too lenient
Closed, ResolvedPublic

Details

Reference
bz21966
bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz21966.
bzimport added a subscriber: Unknown Object (MLST).
Reedy created this task.Dec 29 2009, 3:09 PM
Reedy added a comment.Dec 29 2009, 3:16 PM

http://en.wikipedia.org/w/api.php?action=query&format=xml&list=usercontribs&ucuser=Category:WPB&uclimit=max also gives the same result

The API is presumably stripping the namespace (which it should only be doing if the namespace IS User), and using that as a username

Reedy added a comment.Dec 29 2009, 3:20 PM

Changing title accordingly

Reedy added a comment.Jan 1 2010, 11:28 PM

It's the call to getCanonicalName (as i think was decided on IRC). It doesn't care what it get, it just returns after the :

IW's give the same.

So it's just some validation on the page title to make sure there is No NS (technically NS_MAIN), or else its NS_USER

Trying to find similar behaviour elsewhere.. Doesn't seem to exist.

Some modules seem to take it as is, and return naff all, others errors and say it can't find the page...

Reedy added a comment.Jan 1 2010, 11:42 PM

b21991 being "fixed" will resolve this (as the fix doesn't matter too much, as long as it's common with the rest of the API)

(In reply to comment #4)

b21991 being "fixed" will resolve this (as the fix doesn't matter too much, as
long as it's common with the rest of the API)

Bug 21991. I wonder if we should support bXXXX syntax.

EN.WP.ST47 wrote:

The problem here appears to be that when you ask what a category has contributed via the API, that you get results. This is still true, but it looks like bug 21991 (mentioned above) seeks to find a single common and correct way to normalize a username, which would convert User:Foo to Foo but Template:Foo to Template:Foo, I presume. If so, this bug appears to depend on bug 21991, or is a duplicate of that bug?

Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.Feb 20 2015, 7:36 PM
Anomie closed this task as Resolved.May 19 2018, 3:36 PM
Anomie added a subscriber: Anomie.

I can't find when this was fixed, but it does not seem to occur anymore.