Last modified: 2008-11-18 13:44:55 UTC
I have given anons permission to block people (LocalSettings contains: $wgGroupPermissions['*']['block'] = true;) So as an anon, I tried blocking myself (by IP address) for 2 hours. This worked. So then I logged in to my named account, with the intention of unblocking my IP address. What I would expect at Special:Ipblocklist is to see the blocked IP address in the list. However, it says "The blocklist is empty". Bypassing mediawiki and going to the db layer shows this is not the case: mysql> select * from ipblocks; +--------+-------------+----------+--------+------------+----------------+----------+---------------+--------------------+----------------+-----------------+---------------+ | ipb_id | ipb_address | ipb_user | ipb_by | ipb_reason | ipb_timestamp | ipb_auto | ipb_anon_only | ipb_create_account | ipb_expiry | ipb_range_start | ipb_range_end | +--------+-------------+----------+--------+------------+----------------+----------+---------------+--------------------+----------------+-----------------+---------------+ | 1 | 192.168.0.2 | 0 | 0 | | 20060714044007 | 0 | 0 | 1 | 20060714064007 | | | +--------+-------------+----------+--------+------------+----------------+----------+---------------+--------------------+----------------+-----------------+---------------+ 1 row in set (0.00 sec) Then when I try to edit as an the anon, I get this message: " Your user name or IP address has been blocked. The block was made by [[User:|]]. The reason given is ' " Is this normal? Doesn't a limited time block still appear in the blocklist? It seems to work as expected provided the block is done by a named account, but seems to get its knickers in a twist when the blocking is done by an anon.
Don't do that, it will break if you ask the software to do impossible things.
Created attachment 2084 [details] Patch for the impossible IPBlocklistPager::getQueryInfo() uses a join between the 'user' and 'ipblocks' tables. In the case of a block made by an anon, there will be no corresponding user row, hence the block still exists, is still enforced, but just is not visible on Special:Ipblocklist. With this it is listed, but by user "unknown", since the person who did the blocking is unknown by Special:Ipblocklist.
Fixed some time ago with the advent of ipb_by_text.