Pull downstream fixes from Debian package 1.1.0-1:
authornbk <nbk>
Thu, 19 Jan 2006 16:50:59 +0000 (16:50 +0000)
committernbk <nbk>
Thu, 19 Jan 2006 16:50:59 +0000 (16:50 +0000)
- 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.

Thanks to Arve Seljebu and Paul Hampson.

dialup_admin/Changelog
dialup_admin/htdocs/badusers.php3
dialup_admin/htdocs/failed_logins.php3
dialup_admin/htdocs/group_admin.php3
dialup_admin/htdocs/group_new.php3
dialup_admin/htdocs/user_accounting.php3
dialup_admin/htdocs/user_edit.php3
dialup_admin/htdocs/user_new.php3
dialup_admin/htdocs/user_stats.php3
dialup_admin/htdocs/user_test.php3
dialup_admin/lib/sql/find.php3

index 141ed29..af8c585 100644 (file)
@@ -1,3 +1,8 @@
+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
index 55c7dab..ae0d9df 100644 (file)
@@ -31,7 +31,7 @@ $prev_str = da_sql_escape_string($prev_str);
 
 $num = 0;
 $pagesize = ($pagesize) ? $pagesize : 10;
-if (!is_int($pagesize))
+if (!is_numeric($pagesize) && $pagesize != 'all')
        $pagesize = 10;
 $limit = ($pagesize == 'all') ? '' : "LIMIT $pagesize";
 $selected[$pagesize] = 'selected';
index 23b77c4..938ed82 100644 (file)
@@ -33,7 +33,7 @@ $now_str = da_sql_escape_string($now_str);
 $prev_str = da_sql_escape_string($prev_str);
 
 $pagesize = ($pagesize) ? $pagesize : 10;
-if (!is_int($pagesize))
+if (!is_numeric($pagesize) && $pagesize != 'all')
        $pagesize = 10;
 $limit = ($pagesize == 'all') ? '' : "LIMIT $pagesize";
 $selected[$pagesize] = 'selected';
index bd51886..172f4f1 100644 (file)
@@ -1,9 +1,9 @@
 <?php
+require('../conf/config.php3');
 if ($show == 1 && isset($del_members)){
         header("Location: user_admin.php3?login=$del_members[0]");
         exit;
 }
-require('../conf/config.php3');
 if ($config[general_lib_type] != 'sql'){
        echo <<<EOM
 <title>Group Administration Page</title>
index 8a1fadd..bce1d1b 100644 (file)
@@ -1,9 +1,9 @@
 <?php
+require('../conf/config.php3');
 if ($show == 1){
        header("Location: group_admin.php3?login=$login");
        exit;
 }
-require('../conf/config.php3');
 
 if ($config[general_lib_type] != 'sql'){
        echo <<<EOM
index 74399f5..81be558 100644 (file)
@@ -29,7 +29,7 @@ $now_str = ($now_str != '') ? "$now_str" : date($config[sql_date_format],$now +
 $prev_str = ($prev_str != '') ? "$prev_str" : date($config[sql_date_format], $now - 604800 );
 $num = 0;
 $pagesize = ($pagesize) ? $pagesize : 10;
-if (!is_int($pagesize))
+if (!is_numeric($pagesize) && $pagesize != 'all')
        $pagesize = 10;
 $limit = ($pagesize == 'all') ? '' : "LIMIT $pagesize";
 $selected[$pagesize] = 'selected';
index b98a314..d8251d9 100644 (file)
@@ -1,9 +1,9 @@
 <?php
+require('../conf/config.php3');
 if ($edit_group == 1){
        header("Location: group_admin.php3?login=$group_to_edit");
        exit;
 }
-require('../conf/config.php3');
 require('../lib/attrshow.php3');
 require('../lib/defaults.php3');
 if ($user_type != 'group'){
index ef70d45..091b826 100644 (file)
@@ -1,9 +1,9 @@
 <?php
+require('../conf/config.php3');
 if ($show == 1){
        header("Location: user_admin.php3?login=$login");
        exit;
 }
-require('../conf/config.php3');
 require('../lib/attrshow.php3');
 require('../lib/defaults.php3');
 
index ecd7285..d1b29db 100644 (file)
@@ -31,8 +31,8 @@ if ($start == '' && $stop == ''){
 $start = da_sql_escape_string($start);
 $stop = da_sql_escape_string($stop);
 $pagesize = ($pagesize) ? $pagesize : 10;
-if (!is_int($pagesize))
-       $pagezise = 10;
+if (!is_numeric($pagesize) && $pagesize != 'all')
+       $pagesize = 10;
 $limit = ($pagesize == 'all') ? '' : "LIMIT $pagesize";
 $selected[$pagesize] = 'selected';
 $order = ($order) ? $order : $config[general_accounting_info_order];
index 4e476ee..34ed715 100644 (file)
@@ -59,7 +59,7 @@ EOM;
 <?php
 if ($server == '' || !preg_match('/^[\w\.]+$/',$server))
        $server = $config[general_radius_server];
-if ($port == 0 || !is_int($port))
+if ($port == 0 || !is_numeric($port))
        $port = $config[general_radius_server_port];
 if ($auth_proto == '')
        $auth_proto = $config[general_radius_server_auth_proto];
index a4a700a..7440c37 100644 (file)
@@ -9,7 +9,7 @@ else{
 $link = @da_sql_pconnect($config);
 if ($link){
        $search = da_sql_escape_string($search);
-       if (!is_int($max_results))
+       if (!is_numeric($max_results))
                $max_results = 10;
        if (($search_IN == 'name' || $search_IN == 'ou') && $config[sql_use_user_info_table] == 'true'){
                $attr = ($search_IN == 'name') ? 'name' : 'department';