Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9132:6886f1e18c76 HEAD
auth: Don't assert-crash if trying to log in as master user but with empty login username.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 15 Jun 2009 21:03:08 -0400 |
parents | c8bb7c18f17b |
children | 6f36829c9e0e |
files | src/auth/auth-request.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/auth-request.c Mon Jun 15 20:48:12 2009 -0400 +++ b/src/auth/auth-request.c Mon Jun 15 21:03:08 2009 -0400 @@ -822,6 +822,11 @@ /* it does, set it. */ login_username = t_strdup_until(username, p); + if (*login_username == '\0') { + *error_r = "Empty login username"; + return FALSE; + } + /* username is the master user */ username = p + 1; }