Skip to content

Commit 50e7d80

Browse files
committed
Validate datastore option "YEAR"
The YEAR option is a numeric value, so should be OptInt in order to go through validation. [FixRM rapid7#8345] [FixRM rapid7#8344]
1 parent fe08903 commit 50e7d80

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/auxiliary/gather/corpwatch_lookup_id.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def initialize(info = {})
3030
register_options(
3131
[
3232
OptString.new('CW_ID', [ true, "The CorpWatch ID of the company", ""]),
33-
OptString.new('YEAR', [ false, "Year to look up", ""]),
33+
OptInt.new('YEAR', [ false, "Year to look up"]),
3434
OptBool.new('GET_LOCATIONS', [ false, "Get locations for company", true]),
3535
OptBool.new('GET_NAMES', [ false, "Get all registered names ofr the company", true]),
3636
OptBool.new('GET_FILINGS', [ false, "Get all filings", false ]),

modules/auxiliary/gather/corpwatch_lookup_name.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def initialize(info = {})
3333
register_options(
3434
[
3535
OptString.new('COMPANY_NAME', [ true, "Search for companies with this name", ""]),
36-
OptString.new('YEAR', [ false, "Limit results to a specific year", ""]),
36+
OptInt.new('YEAR', [ false, "Limit results to a specific year"]),
3737
OptString.new('LIMIT', [ true, "Limit the number of results returned", "5"]),
3838
OptString.new('CORPWATCH_APIKEY', [ false, "Use this API key when getting the data", ""]),
3939
], self.class)

0 commit comments

Comments
 (0)