diff options
author | Elan Ruusamäe <glen@delfi.ee> | 2010-05-28 15:54:27 +0000 |
---|---|---|
committer | Elan Ruusamäe <glen@delfi.ee> | 2010-05-28 15:54:27 +0000 |
commit | a813273c2f0730bb8d045ae01855b7ddca2b2b22 (patch) | |
tree | 8438a22ebebe90840615ff45f0b691f63d6b929d | |
parent | 5518643d399db0bdc54ec15ec2cb2528d0ce1ff9 (diff) | |
download | lighttpd-git-a813273c2f0730bb8d045ae01855b7ddca2b2b22.tar.gz |
- Include IP addresses on error log on password failures (fixes #2191)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2727 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/http_auth.c | 6 |
2 files changed, 4 insertions, 3 deletions
@@ -12,6 +12,7 @@ NEWS * [mod_compress] Fix segfault when etags are disabled (fixes #2169) * Reset uri.authority before TLS servername handling, reset all "keep-alive" data in connection_del (fixes #2125) * Print double quotes properly when dumping config file (fixes #1806) + * Include IP addresses on error log on password failures (fixes #2191) - 1.4.26 - 2010-02-07 * Fix request parser to handle packets with splitted \r\n\r\n (fixes #2105) diff --git a/src/http_auth.c b/src/http_auth.c index 0c0c4a58..094dfba2 100644 --- a/src/http_auth.c +++ b/src/http_auth.c @@ -869,7 +869,7 @@ int http_auth_basic_check(server *srv, connection *con, mod_auth_plugin_data *p, if (AUTH_BACKEND_UNSET == p->conf.auth_backend) { log_error_write(srv, __FILE__, __LINE__, "s", "auth.backend is not set"); } else { - log_error_write(srv, __FILE__, __LINE__, "s", "get_password failed"); + log_error_write(srv, __FILE__, __LINE__, "ss", "get_password failed, IP:", inet_ntop_cache_get_ip(srv, &(con->dst_addr))); } return 0; @@ -877,7 +877,7 @@ int http_auth_basic_check(server *srv, connection *con, mod_auth_plugin_data *p, /* password doesn't match */ if (http_auth_basic_password_compare(srv, p, req, username, realm->value, password, pw)) { - log_error_write(srv, __FILE__, __LINE__, "sbbss", "password doesn't match for ", con->uri.path, username, ", IP:", inet_ntop_cache_get_ip(srv, &(con->dst_addr))); + log_error_write(srv, __FILE__, __LINE__, "sbsBss", "password doesn't match for", con->uri.path, "username:", username, ", IP:", inet_ntop_cache_get_ip(srv, &(con->dst_addr))); buffer_free(username); buffer_free(password); @@ -1138,7 +1138,7 @@ int http_auth_digest_check(server *srv, connection *con, mod_auth_plugin_data *p "digest: digest mismatch", a2, respons); } - log_error_write(srv, __FILE__, __LINE__, "sss", + log_error_write(srv, __FILE__, __LINE__, "ssss", "digest: auth failed for ", username, ": wrong password, IP:", inet_ntop_cache_get_ip(srv, &(con->dst_addr))); buffer_free(b); |