Last modified: 2012-05-11 19:28:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36362, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34362 - IPv6 blocks don't work
IPv6 blocks don't work
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
GlobalBlocking (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: ipv6
Depends on:
Blocks: 35540
  Show dependency treegraph
 
Reported: 2012-02-13 02:37 UTC by Jasper Deng
Modified: 2012-05-11 19:28 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jasper Deng 2012-02-13 02:37:11 UTC
"<ipbanononly>" appears instead of "anononly" in Special:GlobalBlock.

But more importantly, IPv4 global blocks appear correctly in Special:GlobalBlockList, but IPv6 blocks do not.
Comment 1 Jasper Deng 2012-02-13 04:31:20 UTC
Update: I have just found out (using MW 1.18.0 and the current version of GB) that IPv6 blocks also are not effective, even though the blocking form accepts IPv6.

As a side suggestion, allow the ranges to be subject to something like $wgBlockCIDRLimit. Often, cross-wiki raids have many people from many addresses.
Comment 2 Sam Reed (reedy) 2012-02-13 20:17:34 UTC
(In reply to comment #0)
> "<ipbanononly>" appears instead of "anononly" in Special:GlobalBlock.

This looks fine on trunk
Comment 3 Aaron Schulz 2012-02-14 00:53:18 UTC
Two things:
1) The code "$ip_pattern = substr( $hex_ip, 0, 4 ) . '%';" in getGlobalBlockingBlock is not very useful for IPv6
2) The schema only gives 32 chars for ipv6 hex addresses. However IP::toHex() adds a v6- prefix, so the column width is too low. This causes the values to be truncated and the blocks don't work.
Comment 4 Jasper Deng 2012-02-14 03:32:03 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > "<ipbanononly>" appears instead of "anononly" in Special:GlobalBlock.
> 
> This looks fine on trunk

I don't have a trunk build; I have r77687. I'm going to try to install the latest build.
(In reply to comment #3)
> Two things:
> 1) The code "$ip_pattern = substr( $hex_ip, 0, 4 ) . '%';" in
> getGlobalBlockingBlock is not very useful for IPv6
> 2) The schema only gives 32 chars for ipv6 hex addresses. However IP::toHex()
> adds a v6- prefix, so the column width is too low. This causes the values to be
> truncated and the blocks don't work.

It looks like, then, we'll need to make a separate table in the schema for IPv6...
Comment 5 Jasper Deng 2012-02-14 04:30:37 UTC
Update: Using r100842, there's no problem with the anon only field, but the IPv6 issue is pretty big, and is probably a major reason why the WMF cannot deploy WMF to commercial use yet.
Comment 6 Sam Reed (reedy) 2012-02-14 16:06:33 UTC
Probably just lengthening the field is more than enough, maybe a flag to say is ipv6 or something

Less than 10k rows on wmf usage, so schema changes are relatively cheap


(In reply to comment #3)
> 2) The schema only gives 32 chars for ipv6 hex addresses. However IP::toHex()
> adds a v6- prefix, so the column width is too low. This causes the values to be
> truncated and the blocks don't work.

I do like the comment here:

gb_range_start varbinary(32) NOT NULL, -- Needs 32, not 8 for IPv6 support
Comment 7 Jasper Deng 2012-03-11 23:22:52 UTC
I expanded those fields to varbinary(35) instead of 32, and it works like a charm.
Comment 8 Sam Reed (reedy) 2012-05-11 19:28:01 UTC
https://gerrit.wikimedia.org/r/#/c/6899/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links