volatilityfoundation / volatility3

Volatility 3.0 development
http://volatilityfoundation.org/
Other
2.72k stars 463 forks source link

[configuration.py] use default req value in config_value call #1266

Closed Abyss-W4tcher closed 2 months ago

Abyss-W4tcher commented 2 months ago

While running Volatility with -vvv, I noticed the following recurring messages :

DETAIL 1 volatility3.framework.interfaces.configuration: TypeError - layer_debug requirements only accept bool type: None
DETAIL 1 volatility3.framework.interfaces.configuration: TypeError - layer_debug requirements only accept bool type: None
DETAIL 1 volatility3.framework.interfaces.configuration: TypeError - translation_debug requirements only accept bool type: None
DETAIL 1 volatility3.framework.interfaces.configuration: TypeError - translation_debug requirements only accept bool type: None

However, the requirement had a default value, but was never used :

            requirements.BooleanRequirement(
                name="layer_debug",
                optional=True,
                description="Specify if debugging informations about the layer should be printed to user.",
                default=False,
            ),

This PR fixes the issue, as self.default wasn't used anywhere, and is still None by default.