]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Merge the patches sent by the dialupadmin users in the past for
authornbk <nbk>
Mon, 7 Jan 2008 09:31:48 +0000 (09:31 +0000)
committernbk <nbk>
Mon, 7 Jan 2008 09:31:48 +0000 (09:31 +0000)
the 1.x series.

Changelog
bin/clean_radacct
bin/log_badlogins
bin/monthly_tot_stats
bin/tot_stats
bin/truncate_radacct
htdocs/group_admin.php3
htdocs/user_delete.php3
htdocs/user_edit.php3
lib/sql/create_group.php3

index 600a0da3cf7cf5afee699c9ee2d9c8a4f0b29ac9..d47c90b6a01d923c4eb515ba74a2d96a43eff906 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -106,6 +106,23 @@ Ver 1.72:
 * Fix a small error in lib/sql/find.php3. This closes bug #103
 * Add a small note in the FAQ about checking for sql/ldap driver availability in PHP if the user get's
   a blank white page back.
+
+Ver 1.70.3:
+* Test for unset variable, rather than empty variable in clean_radacct,
+  monthly_tot_stats and truncate_radacct.
+
+Ver 1.70.2:
+* Fix redirects in dialup-admin pages on servers with register_globals
+  turned off.
+* HTTP form fields will always fail is_int, use in_numeric instead.
+
+Ver 1.70.1:
+* Report correct data transfer statistics for users.
+* Lower-case sql column names to match creation scripts.
+* Fix creation of empty groups.
+* Put quote around usernames in HTML output.
+* Properly notice when we've got a blank password to SQL.
+
 Ver 1.70:
 * Add the /bin postgresql compatibility patch from Guy Fraser
 * Add ldap_userdn as a configuration directive. If set we use that for
index 168af3f798b18b8c9a4f20675cd6baa07842a768..7ff82116a0ef73e0382368e5362529ac7595b903 100755 (executable)
@@ -29,7 +29,7 @@ die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
 die "sql command '$sqlcmd' not found or does not seem to be executable\n" if (! -x $sqlcmd);
 
 if ($sql_type eq 'mysql'){
-       $sql_password = ($sql_password eq '') ? '' : "-p$sql_password";
+       $sql_password = (!$sql_password) ? '' : "-p$sql_password";
 }
 $sql_password =~ s/(\W)/\\$1/g;
 
index 402b28be91491e2cb532c99402011f8d6363f572..d44dbb62142134b249b44bf01fe1085735074c5b 100755 (executable)
@@ -95,7 +95,7 @@ close CLIENTS;
 $realm_del = '@' if ($realm_del eq '');
 $realm_for = 'suffix' if ($realm_for eq '');
 if ($sql_type eq 'mysql'){
-       $pass = ($sql_password ne '') ? "-p$sql_password" : '';
+       $pass = (!$sql_password) ? '' : "-p$sql_password";
 }
 else{
        $pass = $sql_password;
index 38ffcabed5c41f20612969482401818215741afb..69bddc6c4480252c09d638755add3864acf3dfff 100755 (executable)
@@ -30,7 +30,7 @@ die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
 die "sql command '$sqlcmd' not found or does not seem to be executable\n" if (! -x $sqlcmd);
 
 if ($sql_type eq 'mysql'){
-       $sql_password = ($sql_password eq '') ? '' : "-p$sql_password";
+       $sql_password = (!$sql_password) ? '' : "-p$sql_password";
 }
 $sql_password =~ s/(\W)/\\$1/g;
 
index f5659e7518927e64eb982a1d493bf56540d4225e..bc3a4724acde40c28fb9f05548bc26b44046cffc 100755 (executable)
@@ -29,7 +29,7 @@ die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
 die "sql command '$sqlcmd' not found or does not seem to be executable\n" if (! -x $sqlcmd);
 
 if ($sql_type eq 'mysql'){
-       $sql_password = ($sql_password eq '') ? '' : "-p$sql_password";
+       $sql_password = (!$sql_password) ? '' : "-p$sql_password";
 }
 $sql_password =~ s/(\W)/\\$1/g;
 
index 09f919352fe07bc9f2c6f6135ecda626b8194999..a2eb545bd6ce239867b72ea9088f487b8114ff2e 100755 (executable)
@@ -29,7 +29,7 @@ die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
 die "sql command '$sqlcmd' not found or does not seem to be executable\n" if (! -x $sqlcmd);
 
 if ($sql_type eq 'mysql'){
-       $sql_password = ($sql_password eq '') ? '' : "-p$sql_password";
+       $sql_password = (!$sql_password) ? '' : "-p$sql_password";
 }
 $sql_password =~ s/(\W)/\\$1/g;
 
index 49e7a17fbba8a3c1564c3bb3419b565419450db5..58326f8d14a573949507eaabc3b2d414816738aa 100644 (file)
@@ -89,7 +89,7 @@ if ($do_changes == 1){
 
 
    <form method=post>
-      <input type=hidden name=login value=<?php echo $login ?>>
+      <input type=hidden name=login value="<?php echo $login ?>">
       <input type=hidden name=do_changes value=0>
       <input type=hidden name=show value=0>
        <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
index 35f21283378d5957ccd34387ff33bc3c089212d5..32ab293221f2f31a1d7018615df802260e87fbec 100644 (file)
@@ -80,7 +80,7 @@ EOM;
 }
 ?>
    <form method=post>
-      <input type=hidden name=login value=<?php print $login ?>>
+      <input type=hidden name=login value="<?php print $login ?>">
       <input type=hidden name=delete_user value="0">
        <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
 <tr>
index bdb32a9c914b3dee0dab0ed602998efeb15a68be..a4754e804754d6b9efaefe8ca1da7572a20bf4ec 100644 (file)
@@ -104,7 +104,7 @@ else if ($badusers == 1){
 
 ?>
    <form name="edituser" method=post>
-      <input type=hidden name=login value=<?php print $login ?>>
+      <input type=hidden name=login value="<?php print $login ?>">
       <input type=hidden name=user_type value=<?php print $user_type ?>>
       <input type=hidden name=change value="0">
       <input type=hidden name=add value="0">
index 0539b9902c531fcb93bae15cb59a9bd6e76edd6e..f16a64413f0bb689b48a78260818ab5c01d0ac9e 100644 (file)
@@ -27,9 +27,15 @@ if ($link){
                                $da_abort=1;
                        }
                }
+       } else {
+               $res = @da_sql_query($link,$config,
+               "INSERT INTO $config[sql_usergroup_table] (groupname)
+               VALUES ('$login');");
+               if (!$res || !@da_sql_affected_rows($link,$res,$config)){
+                       echo "<b>Unable to create group $login: " . da_sql_error($link,$config) . "</b><br>\n";
+                       $da_abort=1;
+               }
        }
-       else
-               echo "<b>Members list is empty!!</b><br>\n";
        if (!$da_abort){
                foreach($show_attrs as $key => $attr){
                        if ($attrmap["$key"] == 'none')