Page MenuHomePhabricator

API cannot rollback anonymous users
Closed, ResolvedPublic

Description

Author: matthew.britton

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


Version: unspecified
Severity: major

Details

Reference
bz15527

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:24 PM
bzimport set Reference to bz15527.

EN.WP.ST47 wrote:

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.

attachment 15527.diff ignored as obsolete

EN.WP.ST47 wrote:

Do it differently

Just change the above to do it the same way as you did it in the ApiQueryBlocks.php

Attached: