Changeset 2762

Show
Ignore:
Timestamp:
10/16/08 21:34:46 (5 years ago)
Author:
plg
Message:

merge -c2755 from branch 2.0 to branch 1.7

- fix vulnerability  http://www.milw0rm.com/exploits/6755

Location:
branches/branch-1_7
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/branch-1_7/comments.php

    r2031 r2762  
    7070$page['sort_by'] = 'date'; 
    7171// if the form was submitted, it overloads default behaviour 
    72 if (isset($_GET['sort_by'])) 
     72if (isset($_GET['sort_by']) and isset($sort_by[$_GET['sort_by']]) ) 
    7373{ 
    7474  $page['sort_by'] = $_GET['sort_by']; 
     
    7979$page['sort_order'] = $sort_order['descending']; 
    8080// if the form was submitted, it overloads default behaviour 
    81 if (isset($_GET['sort_order'])) 
     81if (isset($_GET['sort_order']) and isset($sort_order[$_GET['sort_order']])) 
    8282{ 
    8383  $page['sort_order'] = $sort_order[$_GET['sort_order']]; 
  • branches/branch-1_7/plugins/event_tracer/event_list.php

    r1900 r2762  
    1717          { 
    1818            $files = array_merge($files, get_php_files($path.'/'.$node, $to_ignore)); 
    19              
     19 
    2020          } 
    2121          if ( is_file($path.'/'.$node) ) 
     
    4444  $code = preg_replace( '#\/\*.*\*\/#m', '', $code); 
    4545  $code = preg_replace( '#\/\/.*#', '', $code); 
    46    
     46 
    4747  $count = preg_match_all( 
    4848    '#[^a-zA-Z_$-]trigger_(action|event)\s*\(\s*([^,)]+)#m', 
     
    5858} 
    5959 
    60 $sort= isset($_GET['sort']) ? $_GET['sort'] : 1; 
     60$sort= isset($_GET['sort']) ? (int)$_GET['sort'] : 1; 
    6161usort( 
    6262  $events,