@@ -55,7 +55,9 @@ void notify_end_and_wait_for_result(void)
5555static void sanitize_remote_filename (char * untrusted_filename )
5656{
5757 for (; * untrusted_filename ; ++ untrusted_filename ) {
58- if (* untrusted_filename < ' ' || * untrusted_filename > '~' )
58+ if (* untrusted_filename < ' ' ||
59+ * untrusted_filename > '~' ||
60+ * untrusted_filename == '"' )
5961 * untrusted_filename = '_' ;
6062 }
6163}
@@ -100,10 +102,10 @@ void wait_for_result(void)
100102 if (hdr .error_code != 0 ) {
101103 switch (hdr .error_code ) {
102104 case EEXIST :
103- call_error_handler ("A file named “%s” already exists in QubesIncoming dir" , last_filename );
105+ call_error_handler ("A file named \"%s\" already exists in QubesIncoming dir" , last_filename );
104106 break ;
105107 case EINVAL :
106- call_error_handler ("File copy: Corrupted data from packer%s“%s” " , last_filename_prefix , last_filename );
108+ call_error_handler ("File copy: Corrupted data from packer%s\"%s\" " , last_filename_prefix , last_filename );
107109 break ;
108110 case EDQUOT :
109111 if (ignore_quota_error ) {
@@ -113,7 +115,7 @@ void wait_for_result(void)
113115 }
114116 /* fallthrough */
115117 default :
116- call_error_handler ("File copy: “ %s%s%s” " ,
118+ call_error_handler ("File copy: \" %s%s%s\" " ,
117119 strerror (hdr .error_code ), last_filename_prefix , last_filename );
118120 }
119121 }
0 commit comments