Comments (3)
Using CIDR is standard; we should do so here. Perhaps a utility function to convert back and forth would be useful though.
Imported from https://jira.toolserver.org/browse/SWMTBOT-7
- User: Mike.lifeguard
- Date: 03 June 2010 17:21:56
from labs-countervandalism-cvnbot.
Given how we query lists right now, this will require some added logic. I'd recommend matching the logic that MediaWiki uses to store IP range blocks.
- Change database to also include a range_start and range_end for IP addresses, and using hexadecimal syntax.
- That way, the addressed can be matched using
<
and>
in SQL syntax. For example, we can store127.0.0.0/25
asrange_start=7F000000
range_end=7F00007F
. And then, where previously we queried for trying to find127.0.0.1
, we'll now first convert it to hex (7F000001
) and then also queryrange_start <= 7F000001 AND range_end >= 7F000001
.
https://github.com/wikimedia/mediawiki/blob/1.28.0/includes/Block.php#L348-L373
https://github.com/wikimedia/mediawiki/blob/1.28.0/includes/libs/IP.php#L503-L540
from labs-countervandalism-cvnbot.
Moved to https://phabricator.wikimedia.org/T327125.
from labs-countervandalism-cvnbot.
Related Issues (20)
- Secondary account creations are displayed as if the creator's account is being created HOT 2
- Fatal error on quit HOT 1
- Fix unmatched block type errors
- Protection flags displayed inside article name HOT 2
- Greylist should not override Blacklist HOT 2
- Ignore multiple spaces between user name and expiry in list commands
- get(admin|bots)/batchgetusers should fully update the list of users HOT 4
- Can not load webresources due to "SecureChannelFailure#012" occured HOT 2
- Can not load new project due to "The remote server returned an error: (404) Not Found." occured
- Release 1.22 HOT 6
- Unable to reload - returns 404 HOT 1
- Broken CentralAuth URL on accounts created by others HOT 6
- ReactorException: Item has already been added. Key in dictionary: 'watchword' Key being added: 'watchword'
- Error "IRC: Closing Link" should be handled HOT 2
- Consider hiding deletion events in CVN channels HOT 2
- Support running CVNBot on dotnet HOT 3
- #cvn-wikidata loses RCReader connection HOT 1
- Rewrite in Python 3 HOT 3
- Process should exit (or restart) if gone from feed network and source network HOT 2
- Ignore blocks made with 'flood' flag HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from labs-countervandalism-cvnbot.