appendfile
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Sun, 28 Mar 2021 09:00:06 +0000 (11:00 +0200)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Tue, 6 Apr 2021 16:12:02 +0000 (18:12 +0200)
src/src/transports/appendfile.c

index 3f2c4e4437d40274a546a2497bf5b192230f6868..dbb8d75a36cdcfd3cdfbf19629abaf60cc16802d 100644 (file)
@@ -1282,12 +1282,14 @@ if (!(path = expand_string(fdname)))
     expand_string_message);
   goto ret_panic;
   }
-if (is_tainted(path))
+{ uschar *m;
+if (m = is_tainted2(path, 0, "Tainted '%s' (file or directory "
+          "name for %s transport) not permitted", path, tblock->name))
   {
-  addr->message = string_sprintf("Tainted '%s' (file or directory "
-    "name for %s transport) not permitted", path, tblock->name);
+  addr->message = m;
   goto ret_panic;
   }
+}
 
 if (path[0] != '/')
   {