Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

Cidr ranges #7

Merged
merged 2 commits into from
Dec 17, 2014
Merged

Cidr ranges #7

merged 2 commits into from
Dec 17, 2014

Conversation

ryanbillingsley
Copy link
Owner

Bug when using array of CIDR blocks

When an array of CIDR blocks were given, if the first block did not contain the ip address then notBannedIp would be set to true. Then when the next loop through the CIDR blocks occurred, even though the IP was found and was on a blacklist, notBannedIp would still be true therefore allowing access to the ip address.

The solution was to make sure if we found an ip and the mode was set to 'deny' that notBannedIp should be set back to false.

Fixes #6

When an array of CIDR blocks were given, if the first block did not
contain the ip address then notBannedIp would be set to true.  Then when
the next loop through the CIDR blocks occured, even though the IP was
found and was on a blacklist, notBannedIp would still be true therefore
allowing access to the ip address.

The solution was to make sure if we found an ip and the mode was set to
'deny' that notBannedIp should be set back to false.
ryanbillingsley added a commit that referenced this pull request Dec 17, 2014
@ryanbillingsley ryanbillingsley merged commit 7f7016b into master Dec 17, 2014
@ryanbillingsley ryanbillingsley deleted the cidr-ranges branch December 17, 2014 19:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not blocking IP in cidr domain range
2 participants