[freeside-commits] freeside/FS/FS/part_export sqlradius.pm, 1.25.2.2, 1.25.2.3

Ivan,,, ivan at wavetail.420.am
Thu Aug 23 01:23:36 PDT 2007


Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail:/tmp/cvs-serv20431/part_export

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	sqlradius.pm 
Log Message:
fix bug where user could log in to RADIUS with uppercase usernameand avoid bandwidth acconting (mysql is case-insensitive?  wtf!  thanks a fucking lot for nothing, grr!)

Index: sqlradius.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/sqlradius.pm,v
retrieving revision 1.25.2.2
retrieving revision 1.25.2.3
diff -u -d -r1.25.2.2 -r1.25.2.3
--- sqlradius.pm	13 Jun 2007 16:56:33 -0000	1.25.2.2
+++ sqlradius.pm	23 Aug 2007 08:23:34 -0000	1.25.2.3
@@ -626,6 +626,8 @@
 sub update_svc_acct {
   my $self = shift;
 
+  my $conf = new FS::Conf;
+
   my $dbh = sqlradius_connect( map $self->option($_),
                                    qw( datasrc username password ) );
 
@@ -650,7 +652,10 @@
          "$RadAcctId ($UserName\@$Realm for ${AcctSessionTime}s"
       if $DEBUG;
 
+    $UserName = lc($UserName) unless $conf->exists('username-uppercase');
+
     my %search = ( 'username' => $UserName );
+
     my $extra_sql = '';
     if ( ref($self) =~ /withdomain/ ) { #well...
       $extra_sql = " AND '$Realm' = ( SELECT domain FROM svc_domain



More information about the freeside-commits mailing list