Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6854:074ae6017b0a HEAD
When saving password, add scheme prefix also if password begins with { but
doesn't contain }. This fixes an assert-crash later.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 25 Nov 2007 03:09:20 +0200 |
parents | 7717e03db8b3 |
children | 5c514ebda66a |
files | src/auth/auth-request.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/auth-request.c Sat Nov 24 15:21:38 2007 +0200 +++ b/src/auth/auth-request.c Sun Nov 25 03:09:20 2007 +0200 @@ -961,7 +961,11 @@ return; } - if (*value == '{') { + /* if the password starts with '{' it most likely contains + also '}'. check it anyway to make sure, because we + assert-crash later if it doesn't exist. this could happen + if plaintext passwords are used. */ + if (*value == '{' && strchr(value, '}') != NULL) { request->passdb_password = p_strdup(request->pool, value); } else {