X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/b4d476116397d395fb9b424e1e4387736865190c..cb45303cf2a8d9922702f13db42b3285c48f6aa7:/src/src/spool_out.c diff --git a/src/src/spool_out.c b/src/src/spool_out.c index 8531112c0..bfa935eb0 100644 --- a/src/src/spool_out.c +++ b/src/src/spool_out.c @@ -3,7 +3,7 @@ *************************************************/ /* Copyright (c) University of Cambridge 1995 - 2018 */ -/* Copyright (c) The Exim Maintainers 2020 */ +/* Copyright (c) The Exim Maintainers 2020 - 2021 */ /* See the file NOTICE for conditions of use and distribution. */ /* Functions for writing spool files, and moving them about. */ @@ -120,8 +120,14 @@ return z; static void spool_var_write(FILE * fp, const uschar * name, const uschar * val) { -if (is_tainted(val)) putc('-', fp); -fprintf(fp, "-%s %s\n", name, val); +putc('-', fp); +if (is_tainted(val)) + { + int q = quoter_for_address(val); + putc('-', fp); + if (is_real_quoter(q)) fprintf(fp, "(%s)", lookup_list[q]->name); + } +fprintf(fp, "%s %s\n", name, val); } /************************************************* @@ -523,7 +529,7 @@ spool_move_message(uschar *id, uschar *subdir, uschar *from, uschar *to) uschar * dest_qname = queue_name_dest ? queue_name_dest : queue_name; /* Since we are working within the spool, de-taint the dest queue name */ -dest_qname = string_copy_taint(dest_qname, FALSE); +dest_qname = string_copy_taint(dest_qname, GET_UNTAINTED); /* Create any output directories that do not exist. */