Skip to content

Fixed bug causing IPRange::include? always return false #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lcarotenuto
Copy link

Description

Deleted a statement in IPRange::include? method.

Motivation and Context

The class IPRange, defined in lib/nexpose/site.rb has the instance method include?(single_ip), which should check if the given ip address is included in the IPRange instance.
The following is the first statement of that method, where :from is the attribute containing the start of range:
return false unless single_ip.respond_to? :from

single_ip should always be a String object, so the statement will always return false since String does not have any method/attributes called :from.

How Has This Been Tested?

This change has been successfully tested on an enterprise environment

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants