Page MenuHomePhabricator

User blocks are not removed when merging and deleting users
Open, Needs TriagePublic

Description

When a blocked user is merged into another account and deleted, the block stays in the ipblocks table with the original ipb_user value. This violates the foreign key (to user.user_id) constraint (which is not enforced when using the MySQL backend). This leads to inconsistent state - the block should be removed when the blocked user is deleted.

Event Timeline

We have UserMerge 1.10.1 (3517022).

The case where we observed this was merging into User:Anonymous (user_id=0) and deleting the original user.