Changeset 2091

Show
Ignore:
Timestamp:
02/26/2008 04:21:44 PM (7 months ago)
Author:
stbuehler
Message:

r2096@chromobil: stefan | 2008-02-26 17:12:09 +0100
Enhancement #1544: Log the ip of failed auth tries in error.log

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/lighttpd-1.4.x/src/http_auth.c

    r1989 r2091  
    3030#include "http_auth.h" 
    3131#include "http_auth_digest.h" 
     32#include "inet_ntop_cache.h" 
    3233#include "stream.h" 
    3334 
     
    863864        /* password doesn't match */ 
    864865        if (http_auth_basic_password_compare(srv, p, req, username, realm->value, password, pw)) { 
    865                 log_error_write(srv, __FILE__, __LINE__, "sbb", "password doesn't match for", con->uri.path, username); 
     866                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))); 
    866867 
    867868                buffer_free(username); 
     
    11311132 
    11321133                log_error_write(srv, __FILE__, __LINE__, "sss", 
    1133                                 "digest: auth failed for", username, "wrong password"); 
     1134                                "digest: auth failed for ", username, ": wrong password, IP:", inet_ntop_cache_get_ip(srv, &(con->dst_addr))); 
    11341135 
    11351136                buffer_free(b);