What is the problem?
When attempting to edit as an IP from an IP that is blocked and IP Masking is enabled, the block message is duplicated.
It does not seem to matter if the IP is blocked by a local database block, global block, system block or a combination of any of these. Whatever the block error message is for the particular block, it is duplicated.
Originally found in T345683#9279144.
Steps to reproduce problem
- If testing locally, add this to you LocalSettings.php: $wgAutoCreateTempUser['enabled'] = true;
- Locally or on dewiki beta, while logged out, go to Special:MyTalk to find out what your IP address is (e.g. http://localhost:8080/wiki/Special:MyTalk or https://de.wikipedia.beta.wmflabs.org/wiki/Special:MyTalk)
- Login as an admin user, go to Special:Block and block the IP from step 1. (Use a "sitewide" block. Any other parameters shouldn't matter.)
- Log out and attempt to edit any page on the wiki
Expected behaviour: You see one blocked message. It will look something like this (if on an English wiki) or this (if on dewiki) but without the red/yellow banner.
Observed behaviour: The blocked message is duplicated.
Environment
Wiki(s): https://de.wikipedia.beta.wmflabs.org MediaWiki 1.42.0-alpha (af78055) 08:54, 31 October 2023.
Screenshots
Example showing a single duplicated block message:
Example showing two block messages being duplicated (one IP range and $wgDnsBlacklistUrls):