diff --git a/agent_based/cve_2021_44228_log4j.py b/agent_based/cve_2021_44228_log4j.py index 514717483362c7837da4fe8c1dc68c3308fb805a..5f014650174da6dc111e521e4c190e4024a1f7c3 100644 --- a/agent_based/cve_2021_44228_log4j.py +++ b/agent_based/cve_2021_44228_log4j.py @@ -31,6 +31,7 @@ # 2022-02-05: fixed missing comment in CVE data (THX to doc[at]snowheaven[dot]de) # 2022-02-07: added state_not_fixed option for per cve plugin # 2022-02-14: added files_safe counter +# 2022-10-24: replace "\n" with "\N" in details output to avoid linebreaks in filenames with "\n" (usually in Windows only) # # sample agent output @@ -456,7 +457,7 @@ def check_cve_2021_44228_log4j(params, section: CVE_2021_44228_log4j) -> CheckRe yield Result(state=State(params['state_missing_output']), notice=f'{label} is missing from agent output') yield Result(state=State.OK, notice='\nRaw output of the script and the scanner:') - yield Result(state=State.OK, notice=section.details) + yield Result(state=State.OK, notice=section.details.replace('\\n', '\\N')) register.agent_section( diff --git a/cve_2021_44228_log4j.mkp b/cve_2021_44228_log4j.mkp index 4a8cce4ef6c2b7bf0f6ef06bbb3cce4cf4a83dec..d08f304eed1eee53065fb63a79f3af78bbf79f03 100644 Binary files a/cve_2021_44228_log4j.mkp and b/cve_2021_44228_log4j.mkp differ diff --git a/packages/cve_2021_44228_log4j b/packages/cve_2021_44228_log4j index ea7e1329e5302d420afeb4d93fdf006b4070d2c5..5b3fd4ba4f8be688d3868d473b9eb7e66db21d3a 100644 --- a/packages/cve_2021_44228_log4j +++ b/packages/cve_2021_44228_log4j @@ -37,7 +37,7 @@ 'name': 'cve_2021_44228_log4j', 'num_files': 9, 'title': 'CVE-2021-44228-log4j scanner plugin', - 'version': '20220506.v0.1.4a', + 'version': '20221130.v0.1.4c', 'version.min_required': '2.0.0', 'version.packaged': '2021.09.20', 'version.usable_until': None} \ No newline at end of file diff --git a/web/plugins/wato/cve_2021_44228_log4j.py b/web/plugins/wato/cve_2021_44228_log4j.py index 34bbea9824b730ed05a689da3414c5fea10ac175..61ab23a3a3be74daddfba9edec8f0d6e310a05bc 100644 --- a/web/plugins/wato/cve_2021_44228_log4j.py +++ b/web/plugins/wato/cve_2021_44228_log4j.py @@ -37,7 +37,7 @@ # 2022-02-14: added option "Report safe files" (--report-patch) # removed "Use logpresse log watch" and "Report fixed" from windows options, need to stay with pre 3.0.0 # scanner version (3.0.0 and up are to large for the installer :-() -# +# 2022-11-30: fixed CheckParameterRulespecWithoutItem (from CheckParameterRulespecWithItem) from cmk.gui.i18n import _ from cmk.gui.valuespec import ( @@ -63,6 +63,7 @@ from cmk.gui.plugins.wato import ( RulespecGroupCheckParametersOperatingSystem, RulespecGroupCheckParametersDiscovery, CheckParameterRulespecWithItem, + CheckParameterRulespecWithoutItem, HostRulespec, ) from cmk.gui.plugins.wato.utils import ( @@ -235,7 +236,7 @@ def _valuespec_cve_2021_44228_log4j(): rulespec_registry.register( - CheckParameterRulespecWithItem( + CheckParameterRulespecWithoutItem( check_group_name='cve_2021_44228_log4j', group=RulespecGroupCheckParametersOperatingSystem, parameter_valuespec=_valuespec_cve_2021_44228_log4j,