Page MenuHomePhabricator

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

Details

Reference
bz21966

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:48 PM
bzimport set Reference to bz21966.
bzimport added a subscriber: Unknown Object (MLST).

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

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...

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 subscribed.

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