Last modified: 2007-07-05 19:49:30 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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.