Page MenuHomePhabricator

AbuseFilter blocked a user twice at the same time
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
The user got blocked twice at the same time by the AbuseFilter and it resulted in two entries to the ipblocks table. (Later, when Masti prolonged the block, one of the entries got changed to reflect that – but that's along the assumptions, I guess). Judging from the abuse log, this double block was likely triggered by a single edit because looking at the user contributions, normally there are significant delays between their edits (however, it's just a guess).

SQL query result from plwiki_p:

SELECT ipb_id, ipb_address, ipb_user, ipb_reason_id, ipb_timestamp, ipb_expiry, ipb_by_actor FROM ipblocks WHERE ipb_address = 'Czrany spoljar96';

+---------+------------------+----------+---------------+----------------+----------------+--------------+
| ipb_id  | ipb_address      | ipb_user | ipb_reason_id | ipb_timestamp  | ipb_expiry     | ipb_by_actor |
+---------+------------------+----------+---------------+----------------+----------------+--------------+
| 1935027 | Czrany spoljar96 |  1313103 |         39008 | 20240412072347 | infinity       |          299 |
| 1935029 | Czrany spoljar96 |  1313103 |      23526675 | 20240412072347 | 20240412132347 |       538183 |
+---------+------------------+----------+---------------+----------------+----------------+--------------+

What should have happened instead?:
To prevent confusion, AbuseFilter should block the user just once.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia): plwiki

Other information (browser name/version, screenshots, etc.):
Block list from the special page

image.png (375×1 px, 72 KB)

Seems similar to T75692: Abuse filter blocks the same user more than once but this time there were two actual blocks not only repeated log entries.

Event Timeline

The code that is responsible for ensuring only one block is applied is here: https://gerrit.wikimedia.org/g/mediawiki/extensions/AbuseFilter/+/1807a077557ec1248b4ef87e46a58db3801d905b/includes/Consequences/ConsequencesExecutor.php#260.

Could the user hit the save button so rapidly that their edit was evaluated twice, in two different requests, before either block was saved?