Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Comments should be escaped when creating or modifying targets. #173

Merged
merged 1 commit into from
May 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading