]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-auth: Unescape passdb/userdb extra fields.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 4 Aug 2016 18:51:18 +0000 (21:51 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 4 Aug 2016 19:16:05 +0000 (22:16 +0300)
This only affected \001, \t, \r and \n characters which were left
tab-escaped (e.g. \t as "\001t").

src/lib-auth/auth-master.c

index b3ceab510f8aa1a2ee9f5d53257c7f5708b85ba3..38b890214731143eafef65be984ff4fc3fe7739c 100644 (file)
@@ -209,7 +209,7 @@ static bool auth_lookup_reply_callback(const char *cmd, const char *const *args,
        if (ctx->return_value >= 0) {
                ctx->fields = p_new(ctx->pool, const char *, len + 1);
                for (i = 0; i < len; i++)
-                       ctx->fields[i] = p_strdup(ctx->pool, args[i]);
+                       ctx->fields[i] = str_tabunescape(p_strdup(ctx->pool, args[i]));
        } else {
                /* put the reason string into first field */
                ctx->fields = p_new(ctx->pool, const char *, 2);