changeset 18537:8a3da4ef590f

auth: Fixed credentials lookups via auth-workers when no actual password was returned. For example LDAP lookup with auth_bind=yes should still return any extra fields.
author Timo Sirainen <tss@iki.fi>
date Thu, 07 May 2015 11:27:55 +0300
parents 5dc00179dd60
children d3332ee1d26a
files src/auth/auth-worker-client.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/auth-worker-client.c	Thu May 07 11:21:33 2015 +0300
+++ b/src/auth/auth-worker-client.c	Thu May 07 11:27:55 2015 +0300
@@ -241,7 +241,9 @@
 	else {
 		str_append(str, "OK\t");
 		str_append_tabescaped(str, request->user);
-		str_printfa(str, "\t{%s.b64}", request->credentials_scheme);
+		str_append_c(str, '\t');
+		if (request->credentials_scheme[0] != '\0')
+			str_printfa(str, "{%s.b64}", request->credentials_scheme);
 		base64_encode(credentials, size, str);
 		reply_append_extra_fields(str, request);
 	}