Mercurial > dovecot > original-hg > dovecot-2.1
changeset 14943:00de06c6cc21
auth: Fixed passdb_import not to crash when =value isn't given.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 31 Mar 2013 17:47:52 +0300 |
parents | 963c6f616aa4 |
children | 78eb04213251 |
files | src/auth/auth-request.c |
diffstat | 1 files changed, 3 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/auth-request.c Sun Mar 31 17:44:34 2013 +0300 +++ b/src/auth/auth-request.c Sun Mar 31 17:47:52 2013 +0300 @@ -1246,16 +1246,10 @@ auth_request_passdb_import(struct auth_request *request, const char *args, const char *default_scheme) { - const char *key, *value, *const *arg = t_strsplit(args, "\t"); + const char *const *arg; - for (; *arg != NULL; arg++) { - value = strchr(*arg, '='); - if (value == NULL) - key = *arg; - else - key = t_strdup_until(*arg, value++); - auth_request_set_field(request, key, value, default_scheme); - } + for (arg = t_strsplit(args, "\t"); *arg != NULL; arg++) + auth_request_set_field_keyvalue(request, *arg, default_scheme); } void auth_request_set_field(struct auth_request *request,