]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
script: Be sure to handle LF+LF properly.
authorTimo Sirainen <tss@iki.fi>
Tue, 9 Aug 2011 17:44:34 +0000 (20:44 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 9 Aug 2011 17:44:34 +0000 (20:44 +0300)
src/plugins/quota/quota.c
src/util/script.c

index 874bf9679d46ad846d3d9f33a8cdc9f5ce4d127c..e67a501820f8a320fd9895d7ca9e571c8b20f173 100644 (file)
@@ -992,7 +992,7 @@ static void quota_warning_execute(struct quota_root *root, const char *cmd)
        if (root->quota->set->debug)
                i_debug("quota: Executing warning: %s", cmd);
 
-       args = t_strsplit(cmd, " ");
+       args = t_strsplit_spaces(cmd, " ");
        socket_path = args[0];
        args++;
 
index babf9a15612bf7fc258f3e9733d59af3a83b7b52..53c6c60f880eb292dbd5acbafef1636f0bee8ffb 100644 (file)
@@ -78,7 +78,7 @@ static bool client_exec_script(struct master_service_connection *conn)
        /* Input contains:
 
           VERSION .. <lf>
-          [<noreply>] <lf>
+          <noreply> | "-" <lf>
 
           arg 1 <lf>
           arg 2 <lf>
@@ -142,6 +142,8 @@ static bool client_exec_script(struct master_service_connection *conn)
                        exec_child(conn, args + 1);
                        i_unreached();
                }
+               if (*args == '\0')
+                       i_fatal("empty options");
                args++;
        }