expand
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Thu, 1 Apr 2021 19:33:50 +0000 (21:33 +0200)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Fri, 23 Apr 2021 20:55:32 +0000 (22:55 +0200)
src/src/expand.c

index 05de94c491a709a9c46162c5d565a07979a4acb9..21b86ebf5781c4e2b6ed7a066e5ca4fbf0b0ad21 100644 (file)
@@ -4383,13 +4383,13 @@ DEBUG(D_expand)
 f.expand_string_forcedfail = FALSE;
 expand_string_message = US"";
 
-if (is_tainted(string))
+{ uschar *m;
+if (m = is_tainted2(string, LOG_MAIN|LOG_PANIC, "Tainted string '%s' in expansion", s))
   {
-  expand_string_message =
-    string_sprintf("attempt to expand tainted string '%s'", s);
-  log_write(0, LOG_MAIN|LOG_PANIC, "%s", expand_string_message);
+  expand_string_message = m;
   goto EXPAND_FAILED;
   }
+}
 
 while (*s != 0)
   {