dovecot-2.2: auth: Don't assert-crash if master user login attem...

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 23 18:28:25 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/65f825a8cd0b
changeset: 18466:65f825a8cd0b
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 23 21:26:50 2015 +0300
description:
auth: Don't assert-crash if master user login attempts to use empty login username.

diffstat:

 src/auth/auth-request.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r c5751819176f -r 65f825a8cd0b src/auth/auth-request.c
--- a/src/auth/auth-request.c	Thu Apr 23 21:19:54 2015 +0300
+++ b/src/auth/auth-request.c	Thu Apr 23 21:26:50 2015 +0300
@@ -1274,7 +1274,10 @@
 {
 	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


More information about the dovecot-cvs mailing list