Closed snoyes closed 1 year ago
Thank you for reporting the issue and for contributing the code fix. We do not have a legal process in place to accept coding contributions from our end-users at this time. Hence, we will implement our own fix for it and will make it available for CTF v1.7 release. But please continue to report issues to help us improve the tool for everyone.
https://github.com/nasa/CTF/blob/982311047cc2417ecdeaebed97ab8d967f40411d/lib/readers/json_script_reader.py#L195-L198
If
command
has no key 'params', then the variableparams
will be None (once issue #41 is fixed), so the condition on line 195 will prevent line 196 from settingcommand["params"]
. Therefore on line 198,command["params"]
may raise a KeyError.A solution is to eliminate the
if params is not None
condition in line 195, so that line 196 always setscommand["params"]
to the sanitizedparams
, even if it sets it to None. Then 198 will never produce a KeyError.