Skip to content

Commit

Permalink
Merge pull request #838 from mattmundell/modify-user-comment
Browse files Browse the repository at this point in the history
Init comment for MODIFY_USER/COMMENT, in case it's empty
  • Loading branch information
timopollmeier authored Oct 28, 2019
2 parents be30656 + 734a475 commit addb601
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion src/gmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit addb601

Please sign in to comment.