Skip to content
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

IPRange include? function error #240

Open
fslavin-r7 opened this issue Jul 1, 2016 · 1 comment · May be fixed by #252
Open

IPRange include? function error #240

fslavin-r7 opened this issue Jul 1, 2016 · 1 comment · May be fixed by #252

Comments

@fslavin-r7
Copy link

The include? function for the IPRange class has an issue processing an input IPRange:
https://github.com/rapid7/nexpose-client/blob/master/lib/nexpose/site.rb#L726

You cannot pass a string or a Ruby IPAddr object in to the include? function because those classes do not respond_to? :from which means the include? function short-circuits immediately.

It looks like the include? function wants an IPRange object as input because it uses the to and from functions. However, passing in an IPRange object results in this stack trace:
screen shot 2016-07-01 at 12 04 10 pm

It looks like this line causes the issue:
https://github.com/rapid7/nexpose-client/blob/master/lib/nexpose/site.rb#L726

I tested this with Gem 5.0.0 and 3.2.2 using Ruby 2.2.1.

@ryanbreed
Copy link

@fslavin-r7 @gschneider-r7 - I think I have a passing PR for this

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

Successfully merging a pull request may close this issue.

4 participants