From d59f6de232bb10453b3e3674164cec3ecb40b8df Mon Sep 17 00:00:00 2001 From: Matt Mundell Date: Mon, 28 Oct 2019 15:37:06 +0200 Subject: [PATCH 1/2] Init comment for MODIFY_USER/COMMENT, in case it's empty --- src/gmp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gmp.c b/src/gmp.c index 95329c9b7..228e96dc5 100644 --- a/src/gmp.c +++ b/src/gmp.c @@ -7683,7 +7683,10 @@ gmp_xml_handle_start_element (/* unused */ GMarkupParseContext* context, case CLIENT_MODIFY_USER: if (strcasecmp ("COMMENT", element_name) == 0) - set_client_state (CLIENT_MODIFY_USER_COMMENT); + { + gvm_append_string (&modify_user_data->comment, ""); + set_client_state (CLIENT_MODIFY_USER_COMMENT); + } else if (strcasecmp ("GROUPS", element_name) == 0) { if (modify_user_data->groups) From 734a4754654ef12c3ad1012154966ffd28215de0 Mon Sep 17 00:00:00 2001 From: Matt Mundell Date: Mon, 28 Oct 2019 15:41:16 +0200 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7abd4c432..c5330367b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Update to gvm-portnames-update to use new nomenclature [#802](https://github.com/greenbone/gvmd/pull/802) - Escaping correctly the percent sign in sql statements [#818](https://github.com/greenbone/gvmd/pull/818) - Remove incorrect duplicates from config preference migrator [#830](https://github.com/greenbone/gvmd/pull/830) +- MODIFY_USER saves comment when COMMENT is empty [#838](https://github.com/greenbone/gvmd/pull/838) ### Removed - Remove support for "All SecInfo": removal of "allinfo" for type in get_info [#790](https://github.com/greenbone/gvmd/pull/790)