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

Validate datastore option "YEAR" #2266

Merged
merged 2 commits into from Aug 26, 2013

Conversation

wchen-r7
Copy link
Contributor

The YEAR option is a numeric value, so should be OptInt in order to go through validation.

[FixRM #8345]
[FixRM #8344]

The YEAR option is a numeric value, so should be OptInt in order to
go through validation.

[FixRM rapid7#8345]
[FixRM rapid7#8344]
@jvazquez-r7
Copy link
Contributor

If you apply the change the module should have into account YEAR is a Fixnum and not an String. After changes I'm experiencing this crash:

[-] Auxiliary failed: TypeError String can't be coerced into Fixnum
[-] Call stack:
[-]   /Users/juan/Projects/git/metasploit-framework/modules/auxiliary/gather/corpwatch_lookup_name.rb:59:in `+'
[-]   /Users/juan/Projects/git/metasploit-framework/modules/auxiliary/gather/corpwatch_lookup_name.rb:59:in `run'
[*] Auxiliary module execution completed

The code raising the exception is expecting an String on datastore['YEAR']:

        uri = "/"
        uri << (datastore['YEAR'] + "/") if datastore['YEAR'] != ""
        uri << "companies.xml"

@jvazquez-r7
Copy link
Contributor

Processing!

@jvazquez-r7
Copy link
Contributor

Looks good now, landing!

@jvazquez-r7 jvazquez-r7 merged commit 6b8feaf into rapid7:master Aug 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants