From: kkalev Date: Fri, 8 Nov 2002 07:18:13 +0000 (+0000) Subject: Fix a few bugs in log_badlogins X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=589e51f0ee1fd1592147398c3e58c4bb12b609be;p=freeradius-dialup-admin.git Fix a few bugs in log_badlogins --- diff --git a/Changelog b/Changelog index 023c406..5530795 100644 --- a/Changelog +++ b/Changelog @@ -4,6 +4,7 @@ Ver 1.61: language specific user attributes will be added in the change info and new user pages. Remove comments from admin.conf about the change info page not working if this directive is used. * When spliting cn in lib/ldap/create_user.php3 limit the split to 2 new elements not 3. +* Fix a few bugs in log_badlogins Ver 1.60: * Use require_once when including lib/functions.php3 in lib/sql * In the buttons toolbar Edit User should not be clickable. diff --git a/bin/log_badlogins b/bin/log_badlogins index a3228b7..99d3fb5 100755 --- a/bin/log_badlogins +++ b/bin/log_badlogins @@ -59,7 +59,7 @@ for(;;){ $user = $nas = $port = $caller = '-'; if (/Login incorrect/){ if (/Login incorrect \((.+?)\):/){ - $cause = 'Login-Incorrect ($1)'; + $cause = "Login-Incorrect ($1)"; }else{ $cause='Login-Incorrect'; } @@ -67,7 +67,7 @@ for(;;){ } elsif (/Invalid user/){ if (/Invalid user \((.+?)\):/){ - $cause = 'Invalid-User ($1)'; + $cause = "Invalid-User ($1)"; }else{ $cause='Invalid-User'; } @@ -78,7 +78,7 @@ for(;;){ $do=1; } elsif (/(Outside allowed timespan \(.+?\)):/){ - $cause = '$1'; + $cause = "$1"; $do=1; } if ($do){ @@ -97,8 +97,8 @@ for(;;){ ($nas,$port,$caller) = (split /\s+/,$2)[1,3,5]; } $caller='' if (!defined($caller)); - $user =~s/[^\w]//g; - $nas =~s/[^\w]//g; + $user =~s/[^\w\-\.]//g; + $nas =~s/[^\w\.]//g; if ($nas ne 'localhost' && $nas !~ /\.$domain$/){ $nas .= '.$domain'; }