dovecot-2.0: auth: Don't assert-crash if trying to log in as mas...

dovecot at dovecot.org dovecot at dovecot.org
Tue Jun 16 04:03:20 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/6462ba85d751
changeset: 9477:6462ba85d751
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 15 21:03:08 2009 -0400
description:
auth: Don't assert-crash if trying to log in as master user but with empty login username.

diffstat:

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

diffs (15 lines):

diff -r d394cca843a9 -r 6462ba85d751 src/auth/auth-request.c
--- a/src/auth/auth-request.c	Mon Jun 15 20:49:27 2009 -0400
+++ b/src/auth/auth-request.c	Mon Jun 15 21:03:08 2009 -0400
@@ -822,6 +822,11 @@ bool auth_request_set_username(struct au
 			/* 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;
 		}


More information about the dovecot-cvs mailing list