]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Don't assert-crash if master user login attempts to use empty login username.
authorTimo Sirainen <tss@iki.fi>
Thu, 23 Apr 2015 18:26:50 +0000 (21:26 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 23 Apr 2015 18:26:50 +0000 (21:26 +0300)
src/auth/auth-request.c

index 8b00df27a0cbe9dcaa98c1b070ce5459678a2d29..c0bc42406259c8709818484e6c241d86382e989a 100644 (file)
@@ -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