From d50821a543baea740402e41101d50eb619fe35cb Mon Sep 17 00:00:00 2001 From: kkalev Date: Wed, 12 Mar 2003 14:44:28 +0000 Subject: [PATCH] Add support for ! in usernames in log_badlogins --- Changelog | 1 + bin/log_badlogins | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index 4d88196..02f4645 100644 --- a/Changelog +++ b/Changelog @@ -57,6 +57,7 @@ Ver 1.62: create a new page, user_stats.php3 which will show the top users in connections or connections duration based on the data in the totacct table. * Add a few comments in the tot_stats and monthly_tot_stats scripts +* Add support for ! in usernames in log_badlogins Ver 1.61: * Add a string encoder for greek * If general_decode_normal_attributes is set then encode attributes in lib/ldap/change_info. In the near future diff --git a/bin/log_badlogins b/bin/log_badlogins index ae7cae1..6629669 100755 --- a/bin/log_badlogins +++ b/bin/log_badlogins @@ -95,16 +95,16 @@ for(;;){ ($year,$mon,$mday,$hour,$min,$sec)=UnixDate($date2,'%Y','%m','%d','%H','%M','%S'); } $time = "$year-$mon-$mday $hour:$min:$sec"; - if (/\[([\w\-\.]+?)\]\s+\(from (.+?)\)/){ + if (/\[([\w\-\.\!]+?)\]\s+\(from (.+?)\)/){ $user = $1; ($nas,$port,$caller) = (split /\s+/,$2)[1,3,5]; } - elsif (/\[([\w\-\.]+?)\/.+?\]\s+\(from (.+?)\)/){ + elsif (/\[([\w\-\.\!]+?)\/.+?\]\s+\(from (.+?)\)/){ $user = $1; ($nas,$port,$caller) = (split /\s+/,$2)[1,3,5]; } $caller='' if (!defined($caller)); - $user =~s/[^\w\-\.\d]//g; + $user =~s/[^\w\-\.\d\!]//g; $nas =~s/[^\w\.]//g; if ($nas ne 'localhost' && $nas !~ /\.$domain$/){ $nas .= ".$domain"; -- 2.39.5