Skip to content

Commit

Permalink
Fix: Comments should be escaped when creating or modifying targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h-abdelsalam committed May 23, 2024
1 parent 3df34c8 commit 23ff8da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gsad_gmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -5336,7 +5336,8 @@ create_target_gmp (gvm_connection_t *connection, credentials_t *credentials,
CHECK_VARIABLE_INVALID (allow_simultaneous_ips, "Create Target");

if (comment != NULL)
comment_element = g_strdup_printf ("<comment>%s</comment>", comment);
comment_element =
g_markup_printf_escaped ("<comment>%s</comment>", comment);
else
comment_element = g_strdup ("");

Expand Down Expand Up @@ -6307,7 +6308,8 @@ save_target_gmp (gvm_connection_t *connection, credentials_t *credentials,
entity_t entity;

if (comment)
comment_element = g_strdup_printf ("<comment>%s</comment>", comment);
comment_element =
g_markup_printf_escaped ("<comment>%s</comment>", comment);
else
comment_element = g_strdup ("");

Expand Down

0 comments on commit 23ff8da

Please sign in to comment.