From: Timo Sirainen Date: Thu, 23 Apr 2015 18:26:50 +0000 (+0300) Subject: auth: Don't assert-crash if master user login attempts to use empty login username. X-Git-Tag: 2.2.17.rc1~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51d7baa054bf6e833ef2b2fc198ee4ab0974ebb7;p=thirdparty%2Fdovecot%2Fcore.git auth: Don't assert-crash if master user login attempts to use empty login username. --- diff --git a/src/auth/auth-request.c b/src/auth/auth-request.c index 8b00df27a0..c0bc424062 100644 --- a/src/auth/auth-request.c +++ b/src/auth/auth-request.c @@ -1274,7 +1274,10 @@ bool auth_request_set_login_username(struct auth_request *request, { struct auth_passdb *master_passdb; - i_assert(*username != '\0'); + if (username[0] == '\0') { + *error_r = "Master user login attempted to use empty login username"; + return FALSE; + } if (strcmp(username, request->user) == 0) { /* The usernames are the same, we don't really wish to log