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>
Wed, 16 Jun 2021 20:30:37 +0000 (22:30 +0200)
(cherry picked from commit c29b50d2fe17cc108d751175ed4f4113c25c1768)

src/src/transports/appendfile.c

index 139f9a3ef95b67f8790cb76d40277cfc1fe9c298..5cefd147a29262600e14821e2fd7b98fbf8de06f 100644 (file)
@@ -1236,6 +1236,14 @@ if (!(path = expand_string(fdname)))
     expand_string_message);
   goto ret_panic;
   }
+{ uschar *m;
+if (m = is_tainted2(path, 0, "Tainted '%s' (file or directory "
+          "name for %s transport) not permitted", path, tblock->name))
+  {
+  addr->message = m;
+  goto ret_panic;
+  }
+}
 
 if (path[0] != '/')
   {