diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2011-02-13 20:32:35 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-02-13 20:37:01 +0200 |
commit | 86d26ebcb6e57bc20b64089939136419b8365cee (patch) | |
tree | 4603c2072e1e8a7f252e7e5746ffc8a65f66cf5b | |
parent | 638ae5fdc6053ba0cc98fa787fe1c8ecce716baf (diff) | |
download | vdradmin-am-86d26ebcb6e57bc20b64089939136419b8365cee.tar.gz vdradmin-am-86d26ebcb6e57bc20b64089939136419b8365cee.tar.bz2 |
Log unauthenticated HTTP requests.
-rw-r--r-- | HISTORY | 1 | ||||
-rwxr-xr-x | vdradmind.pl | 6 |
2 files changed, 5 insertions, 2 deletions
@@ -7,6 +7,7 @@ VDR-Portal: amair 2010-xx-xx: 3.6.x - Updated: Dutch translation (Submitted by Roel Koelewijn). - Updated: Finnish translation (Ville Skyttä). +- Improved: Access logging (Ville Skyttä). 2010-04-10: 3.6.7 - Updated: Italian translation (Submitted by Diego Pierotto). diff --git a/vdradmind.pl b/vdradmind.pl index 8173417..128b114 100755 --- a/vdradmind.pl +++ b/vdradmind.pl @@ -674,6 +674,8 @@ while (true) { } } + my ($http_status, $bytes_transfered); + # authenticate #print("Username: $username / Password: $password\n"); my $checkpass = defined($username) && defined($password); @@ -682,14 +684,14 @@ while (true) { } elsif (($checkpass && $CONFIG{USERNAME_GUEST} eq $username && $CONFIG{PASSWORD_GUEST} eq $password) && $CONFIG{GUEST_ACCOUNT}) { $Guest = 1; } else { - headerNoAuth(); + ($http_status, $bytes_transfered) = headerNoAuth(); + Log(LOG_INFO, "[ACCESS] " . access_log($Client->peerhost, $username, $raw_request, $http_status, $bytes_transfered, $Request, $http_useragent)); close($Client); next; } # serve request $SVDRP = SVDRP->new; - my ($http_status, $bytes_transfered); $MyURL = "." . $Request; if ($Request eq "/vdradmin.pl" || $Request eq "/vdradmin." . $CONFIG{TV_EXT} || $Request eq "/vdradmin." . $CONFIG{REC_EXT}) { $q = CGI->new($Query); |