[dovecot-cvs] dovecot/src/auth auth-request.c,1.72,1.73
tss at dovecot.org
tss at dovecot.org
Sat Nov 18 22:03:02 UTC 2006
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv6863
Modified Files:
auth-request.c
Log Message:
When invalid character is found from username, say what character it is in
the log message. Also with auth_debug=yes log the whole username
(sanitized).
Index: auth-request.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-request.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- auth-request.c 18 Nov 2006 14:11:40 -0000 1.72
+++ auth-request.c 18 Nov 2006 22:02:59 -0000 1.73
@@ -616,7 +616,9 @@
if (request->auth->username_translation[*p & 0xff] != 0)
*p = request->auth->username_translation[*p & 0xff];
if (request->auth->username_chars[*p & 0xff] == 0) {
- *error_r = "Username contains disallowed characters";
+ *error_r = t_strdup_printf(
+ "Username contains disallowed character: "
+ "0x%02x", *p);
return NULL;
}
}
@@ -681,8 +683,11 @@
}
request->user = auth_request_fix_username(request, username, error_r);
- if (request->user == NULL)
+ if (request->user == NULL) {
+ auth_request_log_debug(request, "auth",
+ "Invalid username: %s", str_sanitize(username, 128));
return FALSE;
+ }
if (login_username != NULL) {
if (!auth_request_set_login_username(request,
More information about the dovecot-cvs
mailing list