Skip to content

IPRange include? function error #240

Open
@fslavin-r7

Description

@fslavin-r7

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions