Page MenuHomePhabricator

Soft blocking IP address prevents autoblock of accounts on that IP address.
Closed, ResolvedPublic

Description

Author: wilhelm

Description:
After a discussion in #wikipedia-en-admins about something unrelated it was brought up that softblocking an IP address, then hardblocking an account on that IP address allows the person on that address to continue to edit under any other non-blocked account. Werdna stated that if this behavior was happening it was a bug. I confirmed the behavior so here I am ;).

Example: I blocked my IP address: [[w:User:24.209.52.11]] for 12 hours *softblock*. Then I create (using my admin account [[w:User:Nixeagle]]) the account [[w:User:Nixeagle2]] and block that account indef with autoblocks set to *on*. In theory this means that any further edits on my IP from an account without IPBE would result in the autoblock triggering. However this does not happen when I try to edit [[w:Wikipedia:Sandbox]] with the account [[wUser:Mixeagle]]. The diff of this edit is at: http://en.wikipedia.org/w/index.php?title=Wikipedia%3ASandbox&diff=279096013&oldid=279095164

Instructions to replicate:

  1. create two socks, [[User:A]] and [[User:B]] (A and B are names of your choice)
  2. *softblock* your IP address
  3. *hardblock* [[User:A]] (leave or turn on autoblocks)
  4. edit using [[User:B]] - The edit will go through, it should not.

Version: 1.15.x
Severity: normal

Details

Reference
bz18111

Event Timeline

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

overlordq wrote:

Likely from the fact that the all block inserts are done as INSERT IGNORE.

Since your IP is already softblocked, it has an entry in the ipblocks table, and there's a unique key constraint on ipb_address.

Whe the hardblock of A will gets submitted, it tries to go back and hardblock the last IP but it's already in the table (but without autoblock flag), and will silently fail.

So when User B comes along, autoblock isn't on for that IP.

overlordq wrote:

I take that back, I'm just an idiot, although that hasn't stopped me yet.

When it checks for blocks, the order is: User, IP, Range, Auto.

Since the IP is softblock, it's an IP anon-only block. User A, is a user block with a autoblock on the IP.

So when User B comes along with the same IP as the softblock/User A, it skips User since User B isn't blocked, it gets to IP, sees the IP is blocked, also notices that its set to anon-only so it goes "Oops, doesn't apply, lets bail" so the autoblock never gets checked.

On a side note, if User A has never edited, there will be no autoblocked IP since autoblocks use most recent contrib, if they've never edited it wont have an IP to add to ipblocks. So the autoblock wont trigger period.

This also may prove to be completely wrong as well :)

This is no longer happening: "Your IP address has been automatically blocked because it was used by another user, who was blocked by WikiSysop."