# HG changeset patch # User Timo Sirainen # Date 1195952960 -7200 # Node ID 074ae6017b0ae0431fe932dd3622183c8c6f0d7b # Parent 7717e03db8b39e7fef80da0c19e29a0c4299dbb1 When saving password, add scheme prefix also if password begins with { but doesn't contain }. This fixes an assert-crash later. diff -r 7717e03db8b3 -r 074ae6017b0a src/auth/auth-request.c --- 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 {