]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mail-filter: tabescape args, this is required by script client 4
authorAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 30 May 2017 11:03:23 +0000 (14:03 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 31 May 2017 07:25:37 +0000 (10:25 +0300)
src/plugins/mail-filter/istream-ext-filter.c
src/plugins/mail-filter/ostream-ext-filter.c

index 5bd90774f86f74c1458a463768d81ceea6b4f003..31746b1e55433cd70a39ce832fee7a08f6ffaf72 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "lib.h"
 #include "str.h"
+#include "strescape.h"
 #include "net.h"
 #include "eacces-error.h"
 #include "fd-set-nonblock.h"
@@ -175,8 +176,8 @@ static int filter_connect(struct mail_filter_istream *mstream,
        str = t_str_new(256);
        str_append(str, "VERSION\tscript\t4\t0\nnoreply\n");
        for (; *argv != NULL; argv++) {
-               str_append(str, *argv);
-               str_append_c(str, '\n');
+               str_append_tabescaped(str, *argv);
+               str_append_c(str, '\t');
        }
        str_append_c(str, '\n');
 
index 4ebfce08af25307e71fe523e2b423ea5d6557b4c..3e8f6020f7b03a02292fba87a225ec8d7571b64b 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "lib.h"
 #include "str.h"
+#include "strescape.h"
 #include "net.h"
 #include "eacces-error.h"
 #include "istream.h"
@@ -148,8 +149,8 @@ static int filter_connect(struct mail_filter_ostream *mstream,
        str = t_str_new(256);
        str_append(str, "VERSION\tscript\t4\t0\nnoreply\n");
        for (; *argv != NULL; argv++) {
-               str_append(str, *argv);
-               str_append_c(str, '\n');
+               str_append_tabescaped(str, *argv);
+               str_append_c(str, '\t');
        }
        str_append_c(str, '\n');