changeset 20578:7c4c18a512a9

lib-auth: Unescape passdb/userdb extra fields. This only affected \001, \t, \r and \n characters which were left tab-escaped (e.g. \t as "\001t").
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 04 Aug 2016 21:51:18 +0300
parents 2d3c5cc2bdab
children 928bc88fb37a
files src/lib-auth/auth-master.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-auth/auth-master.c	Thu Aug 04 20:21:27 2016 +0300
+++ b/src/lib-auth/auth-master.c	Thu Aug 04 21:51:18 2016 +0300
@@ -209,7 +209,7 @@
 	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);