From 96b68b9cdc44a3f5e4ce151c16ca062f98f004e2 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Wed, 2 Sep 2020 11:06:51 +0100 Subject: [PATCH] Plugins: Don't ever insert an invalid value --- volatility/framework/interfaces/plugins.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/volatility/framework/interfaces/plugins.py b/volatility/framework/interfaces/plugins.py index ff7dcb5f3..3eee87464 100644 --- a/volatility/framework/interfaces/plugins.py +++ b/volatility/framework/interfaces/plugins.py @@ -103,7 +103,10 @@ class PluginInterface(interfaces.configuration.ConfigurableInterface, # Populate any optional defaults for requirement in self.get_requirements(): if requirement.name not in self.config: - self.config[requirement.name] = requirement.default + if requirement.default is None: + vollog.warning("Invalid default value provided for requirement: {}".format(requirement.name)) + else: + self.config[requirement.name] = requirement.default self._file_consumer = None # type: Optional[FileConsumerInterface]