changeset 349:799fa0fb33cc

user: skip past {PLAIN} in password fields This lets us share dovecot passwd files and imaptest userfiles.
author Phil Carmody <phil@dovecot.fi>
date Mon, 26 May 2014 14:26:01 +0300
parents b5efe5ea45d9
children 07640a4569f9
files src/user.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/user.c	Tue May 20 05:44:02 2014 -0700
+++ b/src/user.c	Mon May 26 14:26:01 2014 +0300
@@ -50,6 +50,8 @@
 			user = user_get(*userp);
 		} else {
 			user = user_get(t_strdup_until(*userp, p));
+			if (strncmp(p + 1, "{PLAIN}", 7) == 0)
+				p += 7;
 			user->password = p_strdup(user->pool, p+1);
 		}
 	} else {