Last modified: 2008-09-08 23:34:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T17527, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15527 - API cannot rollback anonymous users
API cannot rollback anonymous users
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Roan Kattouw
: patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-08 17:59 UTC by Gurch
Modified: 2008-09-08 23:34 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Loosen the validation for IPs (654 bytes, patch)
2008-09-08 23:12 UTC, Dan Collins
Details
Do it differently (621 bytes, patch)
2008-09-08 23:18 UTC, Dan Collins
Details

Description Gurch 2008-09-08 17:59:01 UTC
It would appear that I cannot rollback anonymous users through the API.

URL: 

http://en.wikipedia.org/w/api.php

Post data (percent-encoded):

action=rollback&format=xml&title=User+talk%3aGurch&user=86.140.177.30&token=f88492c3c482f3f322a9f336faba934a%2b%5c

Response: 

<?xml version="1.0" encoding="utf-8"?><api><error code="invaliduser" info="Invalid username ``86.140.177.30&#039;&#039;" /></api>

Reproduced in other formats on other pages with other anonymous users, also tried percent-encoding the whole username.
Comment 1 Dan Collins 2008-09-08 23:12:11 UTC
Created attachment 5306 [details]
Loosen the validation for IPs

This patch, very simply, only runs the username through the validator if the username is not an IP. If the username is an IP, the validator automatically fails it.
Comment 2 Dan Collins 2008-09-08 23:18:20 UTC
Created attachment 5307 [details]
Do it differently

Just change the above to do it the same way as you did it in the ApiQueryBlocks.php
Comment 3 X! 2008-09-08 23:34:28 UTC
Fixed in r40628

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links