Land #11393, If an option alias is deregistered, also deregister the original option
commit
d2775c02f8
|
@ -306,8 +306,6 @@ class DataStore < Hash
|
|||
list.each(&block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
#
|
||||
# Case-insensitive key lookup
|
||||
#
|
||||
|
|
|
@ -29,8 +29,12 @@ module Msf::Module::Options
|
|||
#
|
||||
def deregister_options(*names)
|
||||
names.each { |name|
|
||||
self.options.remove_option(name)
|
||||
real_name = self.datastore.find_key_case(name)
|
||||
self.datastore.delete(name)
|
||||
self.options.remove_option(name)
|
||||
if real_name != name
|
||||
self.options.remove_option(real_name)
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -62,4 +66,4 @@ module Msf::Module::Options
|
|||
self.datastore.import_options(self.options, 'self', true)
|
||||
import_defaults(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue