Changeset 2418

Show
Ignore:
Timestamp:
09/13/06 21:55:34 (2 years ago)
Author:
qldrob
Message:

Merged revisions 2413 via svnmerge from
https://svn.sourceforge.net/svnroot/amportal/freepbx/branches/2.1

........

r2413 | qldrob | 2006-09-14 13:37:03 +1000 (Thu, 14 Sep 2006) | 3 lines


Remove SQL injection issues - thanks to Barrie Dempster from ngsoftware for the heads up.
(Also, fixed a couple of cut and paste errors between GET and POST)

........

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk

    • Property svnmerge-integrated changed from /freepbx/branches/2.1:1-2057,2059,2061-2078,2282,2287 to /freepbx/branches/2.1:1-2057,2059,2061-2078,2282,2287,2413
  • freepbx/trunk/amp_conf/htdocs/admin/cdr/about.php

    r926 r2418  
    99                if (isset($_POST[$test_var])) {  
    1010                        global $$test_var; 
    11                         $$test_var = $_POST[$test_var];  
     11                        $$test_var = mysql_real_escape_string($_POST[$test_var]);  
    1212                } elseif (isset($_GET[$test_var])) { 
    1313                        global $$test_var;  
    14                         $$test_var = $_GET[$test_var]
     14                        $$test_var = mysql_real_escape_string($_GET[$test_var])
    1515                } 
    1616        } 
  • freepbx/trunk/amp_conf/htdocs/admin/cdr/call-comp.php

    r926 r2418  
    132132    if (strpos($SQLcmd, 'WHERE') > 0) {         $SQLcmd = "$SQLcmd AND "; 
    133133    }else{                                                              $SQLcmd = "$SQLcmd WHERE "; } 
    134     $SQLcmd = "$SQLcmd calldate<'".$_POST['before']."'"; 
     134    $SQLcmd = "$SQLcmd calldate<'".mysql_real_escape_string($_POST['before'])."'"; 
    135135  } 
    136136  if ($_POST['after']) {    if (strpos($SQLcmd, 'WHERE') > 0) {      $SQLcmd = "$SQLcmd AND "; 
    137137  } else {      $SQLcmd = "$SQLcmd WHERE ";    } 
    138     $SQLcmd = "$SQLcmd calldate>'".$_POST['after']."'"; 
     138    $SQLcmd = "$SQLcmd calldate>'".mysql_real_escape_string($_POST['after'])."'"; 
    139139  } 
    140140  $SQLcmd = do_field($SQLcmd, 'clid'); 
  • freepbx/trunk/amp_conf/htdocs/admin/cdr/call-daily-load.php

    r926 r2418  
    129129    if (strpos($SQLcmd, 'WHERE') > 0) {         $SQLcmd = "$SQLcmd AND "; 
    130130    }else{                                                              $SQLcmd = "$SQLcmd WHERE "; } 
    131     $SQLcmd = "$SQLcmd calldate<'".$_POST['before']."'"; 
     131    $SQLcmd = "$SQLcmd calldate<'".mysql_real_escape_string($_POST['before'])."'"; 
    132132  } 
    133133  if ($_POST['after']) {    if (strpos($SQLcmd, 'WHERE') > 0) {      $SQLcmd = "$SQLcmd AND "; 
    134134  } else {      $SQLcmd = "$SQLcmd WHERE ";    } 
    135     $SQLcmd = "$SQLcmd calldate>'".$_POST['after']."'"; 
     135    $SQLcmd = "$SQLcmd calldate>'".mysql_real_escape_string($_POST['after'])."'"; 
    136136  } 
    137137  $SQLcmd = do_field($SQLcmd, 'clid'); 
  • freepbx/trunk/amp_conf/htdocs/admin/cdr/call-last-month.php

    r926 r2418  
    135135  if ($_POST['after']) {    if (strpos($SQLcmd, 'WHERE') > 0) {      $SQLcmd = "$SQLcmd AND "; 
    136136  } else {      $SQLcmd = "$SQLcmd WHERE ";    } 
    137     $SQLcmd = "$SQLcmd calldate>'".$_POST['after']."'"; 
     137    $SQLcmd = "$SQLcmd calldate>'".mysql_real_escape_string($_POST['after'])."'"; 
    138138  } 
    139139  $SQLcmd = do_field($SQLcmd, 'clid'); 
  • freepbx/trunk/amp_conf/htdocs/admin/cdr/cdr.php

    r926 r2418  
    2121                if (isset($_POST[$test_var])) {  
    2222                        global $$test_var; 
    23                         $$test_var = $_POST[$test_var];  
     23                        $$test_var = mysql_real_escape_string($_POST[$test_var]);  
    2424                } elseif (isset($_GET[$test_var])) { 
    2525                        global $$test_var;  
    26                         $$test_var = $_GET[$test_var]
     26                        $$test_var = mysql_real_escape_string($_GET[$test_var])
    2727                } 
    2828        } 
  • freepbx/trunk/amp_conf/htdocs/admin/cdr/graph_hourdetail.php

    r173 r2418  
    8484    if (strpos($SQLcmd, 'WHERE') > 0) {         $SQLcmd = "$SQLcmd AND "; 
    8585    }else{                                                              $SQLcmd = "$SQLcmd WHERE "; } 
    86     $SQLcmd = "$SQLcmd calldate<'".$_POST['before']."'"; 
     86    $SQLcmd = "$SQLcmd calldate<'".mysql_real_escape_string($_POST['before'])."'"; 
    8787  } 
    8888  if ($_POST['after']) {    if (strpos($SQLcmd, 'WHERE') > 0) {      $SQLcmd = "$SQLcmd AND "; 
    8989  } else {      $SQLcmd = "$SQLcmd WHERE ";    } 
    90     $SQLcmd = "$SQLcmd calldate>'".$_POST['after']."'"; 
     90    $SQLcmd = "$SQLcmd calldate>'".mysql_real_escape_string($_POST['after'])."'"; 
    9191  } 
    9292  $SQLcmd = do_field($SQLcmd, 'clid'); 
  • freepbx/trunk/amp_conf/htdocs/admin/cdr/graph_pie.php

    r993 r2418  
    100100    if (strpos($SQLcmd, 'WHERE') > 0) {         $SQLcmd = "$SQLcmd AND "; 
    101101    }else{                                                              $SQLcmd = "$SQLcmd WHERE "; } 
    102     $SQLcmd = "$SQLcmd calldate<'".$_POST['before']."'"; 
     102    $SQLcmd = "$SQLcmd calldate<'".mysql_real_escape_string($_GET['before'])."'"; 
    103103  } 
    104104  if ($_GET['after']) {    if (strpos($SQLcmd, 'WHERE') > 0) {      $SQLcmd = "$SQLcmd AND "; 
    105105  } else {      $SQLcmd = "$SQLcmd WHERE ";    } 
    106     $SQLcmd = "$SQLcmd calldate>'".$_GET['after']."'"; 
     106    $SQLcmd = "$SQLcmd calldate>'".mysql_real_escape_string($_GET['after'])."'"; 
    107107  } 
    108108  $SQLcmd = do_field($SQLcmd, 'clid'); 
  • freepbx/trunk/amp_conf/htdocs/admin/cdr/graph_stat.php

    r351 r2418  
    9797    if (strpos($SQLcmd, 'WHERE') > 0) {         $SQLcmd = "$SQLcmd AND "; 
    9898    }else{                                                              $SQLcmd = "$SQLcmd WHERE "; } 
    99     $SQLcmd = "$SQLcmd calldate<'".$_POST['before']."'"; 
     99    $SQLcmd = "$SQLcmd calldate<'".mysql_real_escape_string($_GET['before'])."'"; 
    100100  } 
    101101  if ($_GET['after']) {    if (strpos($SQLcmd, 'WHERE') > 0) {      $SQLcmd = "$SQLcmd AND "; 
    102102  } else {      $SQLcmd = "$SQLcmd WHERE ";    } 
    103     $SQLcmd = "$SQLcmd calldate>'".$_GET['after']."'"; 
     103    $SQLcmd = "$SQLcmd calldate>'".mysql_real_escape_string($_GET['after'])."'"; 
    104104  } 
    105105  $SQLcmd = do_field($SQLcmd, 'clid'); 
  • freepbx/trunk/amp_conf/htdocs/admin/cdr/graph_statbar.php

    r173 r2418  
    9797    if (strpos($SQLcmd, 'WHERE') > 0) {         $SQLcmd = "$SQLcmd AND "; 
    9898    }else{                                                              $SQLcmd = "$SQLcmd WHERE "; } 
    99     $SQLcmd = "$SQLcmd calldate<'".$_POST['before']."'"; 
     99    $SQLcmd = "$SQLcmd calldate<'".mysql_real_escape_string($_GET['before'])."'"; 
    100100  } 
    101101  if ($_GET['after']) {    if (strpos($SQLcmd, 'WHERE') > 0) {      $SQLcmd = "$SQLcmd AND "; 
    102102  } else {      $SQLcmd = "$SQLcmd WHERE ";    } 
    103     $SQLcmd = "$SQLcmd calldate>'".$_GET['after']."'"; 
     103    $SQLcmd = "$SQLcmd calldate>'".mysql_real_escape_string($_GET['after'])."'"; 
    104104  } 
    105105  $SQLcmd = do_field($SQLcmd, 'clid'); 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads