Page MenuHomePhabricator

Can block a random non-existing user via API
Closed, ResolvedPublic

Description

1st issue. Could block to non-existing user via API.

recently mediawiki, when execute block to non-existing user via API, it was blocked as user id "0 ".

In case of previous version mediawiki, doesn't block it, then 'nosuchuser ' error returned.

http://test.wikipedia.org/wiki/Special:Log/block?page=User%3AHoshiryuhoshiTest

2nd issue. In case of executing block to already blocked user without "reblock arg" via API, In previous version mediawiki, existing block settings are not changed to new block settings.
but recently when executing block to already blocked user without "reblock arg", existing block settings are changed to new block settings.


Version: 1.20.x
Severity: major

Details

Reference
bz38633

Event Timeline

bzimport raised the priority of this task from to High.
bzimport set Reference to bz38633.
bzimport added a subscriber: Unknown Object (MLST).
Rxy created this task.Jul 24 2012, 9:23 AM

Confirmed, I can block a random non-existing user through the UI:

mwc.apiRequest(action = 'block', token = mwc.getEditToken(), user = 'pwokwpfok', reason = 'Test bug 38633')

{u'block': {u'id': u'1', u'reason': u'Test bug 38633', u'userID': 0, u'user': u'pwokwpfok', u'expiry': u'infinite'}}

(In reply to comment #0)

1st issue. Could block to non-existing user via API.

recently mediawiki, when execute block to non-existing user via API, it was
blocked as user id "0 ".

In case of previous version mediawiki, doesn't block it, then 'nosuchuser '
error returned.

http://test.wikipedia.org/wiki/Special:Log/
block?page=User%3AHoshiryuhoshiTest

Gerrit change 39860
Can you make a new bug for your second issue please?

(In reply to comment #0)

2nd issue. In case of executing block to already blocked user without
"reblock
arg" via API, In previous version mediawiki, existing block settings are not
changed to new block settings.
but recently when executing block to already blocked user without "reblock
arg", existing block settings are changed to new block settings.

Split into bug 43634.

(In reply to comment #2)

Gerrit change #39860

Merged by IAlex.