Last modified: 2007-07-05 19:49:30 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 T12424, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10424 - Allows whitelists of IP addresses in ConfirmEdit
Allows whitelists of IP addresses in ConfirmEdit
Product: MediaWiki extensions
Classification: Unclassified
ConfirmEdit (CAPTCHA extension) (Other open bugs)
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
  Show dependency treegraph
Reported: 2007-07-01 06:21 UTC by andy
Modified: 2007-07-05 19:49 UTC (History)
0 users

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

patch with 'patch -P0 < ConfirmEditWhitelistIP.patch' from /extensions/ConfirmEdit (1.08 KB, patch)
2007-07-01 06:21 UTC, andy
Alternate patch to use CIDR ranges instead of regexs (1.06 KB, patch)
2007-07-03 23:07 UTC, andy

Description andy 2007-07-01 06:21:52 UTC
Created attachment 3859 [details]
patch with 'patch -P0 < ConfirmEditWhitelistIP.patch' from /extensions/ConfirmEdit

This is a feature I found useful on a Wiki I run. In my case, to allow all edits from my school's subnet.

It works by specifying an array of regexes to match against IP addresses, if the address matches the edit is allowed.
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-01 18:58:02 UTC
Seems reasonable.
Comment 2 Brion Vibber 2007-07-03 21:09:09 UTC
It seems a bit odd to me to use a regex for an IP list.
It would seem cleaner to use existing (hopefully ;) functions for CIDR IP ranges.
Comment 3 andy 2007-07-03 23:07:56 UTC
Created attachment 3868 [details]
Alternate patch to use CIDR ranges instead of regexs

There's nothing in PHP, but there seems to be something buried in /includes/IP.php ;)
Comment 4 Brion Vibber 2007-07-05 19:49:30 UTC
Looks good -- works for individual IPs as well as ranges, nice!

Applied in r23758, with some tweaks to the doc comment.

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