diff --git a/lib/msf/core/option_container.rb b/lib/msf/core/option_container.rb index 49ffcdb101..c2242dcf93 100644 --- a/lib/msf/core/option_container.rb +++ b/lib/msf/core/option_container.rb @@ -462,6 +462,7 @@ class OptRegexp < OptBase unless super return false end + return true if (not required? and value.nil?) begin Regexp.compile(value) @@ -473,6 +474,7 @@ class OptRegexp < OptBase end def normalize(value) + return nil if value.nil? return Regexp.compile(value) end