From ebc3c2e2f7d9408db7e5335d63fdd2a003c3d79a Mon Sep 17 00:00:00 2001 From: rvelices Date: Thu, 16 Oct 2008 00:38:26 +0000 Subject: merge 2755 and 2756 from branch 2.0 to trunk - 2755 fix vulnerability http://www.milw0rm.com/exploits/6755 - 2756 security paranoia: protect session/remember me cookies from XSS attacks (works only if php>=5.2 and with IE/FF maybe others) git-svn-id: http://piwigo.org/svn/trunk@2757 68402e56-0260-453c-a942-63ccdbb3a9ee --- plugins/event_tracer/event_list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/event_tracer') diff --git a/plugins/event_tracer/event_list.php b/plugins/event_tracer/event_list.php index ae617fe87..1cde14ef3 100644 --- a/plugins/event_tracer/event_list.php +++ b/plugins/event_tracer/event_list.php @@ -16,7 +16,7 @@ function get_php_files($path, $to_ignore=array(), $recursive=true ) if ( $recursive and is_dir($path.'/'.$node) ) { $files = array_merge($files, get_php_files($path.'/'.$node, $to_ignore)); - + } if ( is_file($path.'/'.$node) ) { @@ -43,7 +43,7 @@ foreach ($files as $file) $code = preg_replace( '#\?'.'>.*<\?php#m', '', $code); $code = preg_replace( '#\/\*.*\*\/#m', '', $code); $code = preg_replace( '#\/\/.*#', '', $code); - + $count = preg_match_all( '#[^a-zA-Z_$-]trigger_(action|event)\s*\(\s*([^,)]+)#m', $code, $matches @@ -57,7 +57,7 @@ foreach ($files as $file) } } -$sort= isset($_GET['sort']) ? $_GET['sort'] : 1; +$sort= isset($_GET['sort']) ? (int)$_GET['sort'] : 1; usort( $events, create_function( '$a,$b', 'return $a['.$sort.']>$b['.$sort.'];' ) -- cgit v1.2.3