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) 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)