Skip to content

Commit

Permalink
qrexec-lib/pack: don't use curly quotes in error messages
Browse files Browse the repository at this point in the history
For PROGRESS_TYPE=gui the error handler calls zenity, which fails to
launch if the error message contains characters not supported by the
locale's charset (e.g. LC_CTYPE=C).

Filenames in the error message were already sanitized to printable
ASCII, but then enclosed in UTF-8 curly quotation marks.

Fixes QubesOS/qubes-issues#8738
  • Loading branch information
rustybird committed Dec 2, 2023
1 parent 96698e2 commit 71f5b04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qrexec-lib/pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ void wait_for_result(void)
if (hdr.error_code != 0) {
switch (hdr.error_code) {
case EEXIST:
call_error_handler("A file named “%s” already exists in QubesIncoming dir", last_filename);
call_error_handler("A file named \"%s\" already exists in QubesIncoming dir", last_filename);
break;
case EINVAL:
call_error_handler("File copy: Corrupted data from packer%s“%s”", last_filename_prefix, last_filename);
call_error_handler("File copy: Corrupted data from packer%s\"%s\"", last_filename_prefix, last_filename);
break;
case EDQUOT:
if (ignore_quota_error) {
Expand All @@ -113,7 +113,7 @@ void wait_for_result(void)
}
/* fallthrough */
default:
call_error_handler("File copy: %s%s%s",
call_error_handler("File copy: \"%s%s%s\"",
strerror(hdr.error_code), last_filename_prefix, last_filename);
}
}
Expand Down

0 comments on commit 71f5b04

Please sign in to comment.