]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Fix a few bugs in log_badlogins
authorkkalev <kkalev>
Fri, 8 Nov 2002 07:18:13 +0000 (07:18 +0000)
committerkkalev <kkalev>
Fri, 8 Nov 2002 07:18:13 +0000 (07:18 +0000)
Changelog
bin/log_badlogins

index 023c40693f174548e76b63e40ff6313f88f94daf..5530795b58135c4f023e87a67c87885e5b76140d 100644 (file)
--- 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.
index a3228b7a7a062e918dbbc86dc0db1aa72c4edaa7..99d3fb510e2921efc3df67d8a03c99fe0d6c7f09 100755 (executable)
@@ -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';
                                }