mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-16 20:56:52 -04:00
cli-transaction: Escape any special characters in the EOL reason
CVE-2023-28101, GHSA-h43h-fwqx-mpp8 Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
@@ -755,6 +755,9 @@ print_eol_info_message (FlatpakDir *dir,
|
||||
}
|
||||
else if (reason)
|
||||
{
|
||||
g_autofree char *escaped_reason = flatpak_escape_string (reason,
|
||||
FLATPAK_ESCAPE_ALLOW_NEWLINES |
|
||||
FLATPAK_ESCAPE_DO_NOT_QUOTE);
|
||||
if (is_pinned)
|
||||
{
|
||||
/* Only runtimes can be pinned */
|
||||
@@ -770,7 +773,7 @@ print_eol_info_message (FlatpakDir *dir,
|
||||
g_print (_("\nInfo: app %s%s%s branch %s%s%s is end-of-life, with reason:\n"),
|
||||
on, ref_name, off, on, ref_branch, off);
|
||||
}
|
||||
g_print (" %s\n", reason);
|
||||
g_print (" %s\n", escaped_reason);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user