From 54927248b0b7b7e71b905c3be129305ba98e0456 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 4 Jun 2009 22:10:45 -0700 Subject: Updated for csrf in admin.html.php --- modules/gallery/tests/xss_data.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/gallery/tests') diff --git a/modules/gallery/tests/xss_data.txt b/modules/gallery/tests/xss_data.txt index 04dbd23b..797ca9bb 100644 --- a/modules/gallery/tests/xss_data.txt +++ b/modules/gallery/tests/xss_data.txt @@ -492,6 +492,7 @@ themes/admin_default/views/admin.html.php 31 DIRTY $theme->a themes/admin_default/views/admin.html.php 35 DIRTY $theme->admin_page_top() themes/admin_default/views/admin.html.php 41 DIRTY $theme->site_status() themes/admin_default/views/admin.html.php 43 DIRTY $theme->admin_header_top() +themes/admin_default/views/admin.html.php 46 DIRTY $csrf themes/admin_default/views/admin.html.php 50 DIRTY $theme->admin_menu() themes/admin_default/views/admin.html.php 52 DIRTY $theme->admin_header_bottom() themes/admin_default/views/admin.html.php 58 DIRTY $theme->messages() -- cgit v1.2.3 From 4fcad78f54873a5ae86a88199015545ece1b8cb4 Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Fri, 5 Jun 2009 16:10:08 -0700 Subject: Update golden file of Xss test --- modules/gallery/tests/xss_data.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/gallery/tests') diff --git a/modules/gallery/tests/xss_data.txt b/modules/gallery/tests/xss_data.txt index 797ca9bb..e3dbb188 100644 --- a/modules/gallery/tests/xss_data.txt +++ b/modules/gallery/tests/xss_data.txt @@ -279,7 +279,7 @@ modules/gallery/views/simple_uploader.html.php 30 $item->ti modules/gallery/views/simple_uploader.html.php 77 DIRTY $item->id modules/gallery/views/simple_uploader.html.php 81 DIRTY $csrf modules/image_block/views/image_block_block.html.php 3 DIRTY $item->url() -modules/image_block/views/image_block_block.html.php 4 DIRTY $item->thumb_image(array("class" => "gThumbnail")) +modules/image_block/views/image_block_block.html.php 4 DIRTY $item->thumb_img(array("class" => "gThumbnail")) modules/info/views/info_block.html.php 6 $item->title modules/info/views/info_block.html.php 11 $item->description modules/info/views/info_block.html.php 17 $item->name @@ -613,7 +613,7 @@ themes/default/views/photo.html.php 32 DIRTY $item->re themes/default/views/photo.html.php 36 DIRTY $theme->resize_bottom($item) themes/default/views/photo.html.php 40 $item->title themes/default/views/photo.html.php 41 $item->description -themes/default/views/photo.html.php 44 DIRTY $theme->photo_bottom() +themes/default/views/photo.html.php 47 DIRTY $theme->photo_bottom() themes/default/views/sidebar.html.php 2 DIRTY $theme->sidebar_top() themes/default/views/sidebar.html.php 6 DIRTY $theme->album_menu() themes/default/views/sidebar.html.php 8 DIRTY $theme->photo_menu() -- cgit v1.2.3 From 329bd8caa126040ba7abaf28e8f76e0b6739ceff Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Fri, 5 Jun 2009 18:31:15 -0700 Subject: Remove source code copy artefact --- modules/gallery/tests/Xss_Security_Test.php | 32 ----------------------------- 1 file changed, 32 deletions(-) (limited to 'modules/gallery/tests') diff --git a/modules/gallery/tests/Xss_Security_Test.php b/modules/gallery/tests/Xss_Security_Test.php index 03151c8c..e179482c 100644 --- a/modules/gallery/tests/Xss_Security_Test.php +++ b/modules/gallery/tests/Xss_Security_Test.php @@ -18,41 +18,9 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class Xss_Security_Test extends Unit_Test_Case { - - static function scan_php_file($file, &$cache) { - $code = file_get_contents($file); - $raw_tokens = token_get_all($code); - unset($code); - - $tokens = array(); - $func_token_list = array("t" => array(), "t2" => array()); - $token_number = 0; - // Filter out HTML / whitespace, and build a lookup for global function calls. - foreach ($raw_tokens as $token) { - if ((!is_array($token)) || (($token[0] != T_WHITESPACE) && ($token[0] != T_INLINE_HTML))) { - if (is_array($token)) { - if ($token[0] == T_STRING && in_array($token[1], array("t", "t2"))) { - $func_token_list[$token[1]][] = $token_number; - } - } - $tokens[] = $token; - $token_number++; - } - } - unset($raw_tokens); - - if (!empty($func_token_list["t"])) { - l10n_scanner::_parse_t_calls($tokens, $func_token_list["t"], $cache); - } - if (!empty($func_token_list["t2"])) { - l10n_scanner::_parse_plural_calls($tokens, $func_token_list["t2"], $cache); - } - } - public function find_unescaped_variables_in_views_test() { foreach (glob("*/*/views/*.php") as $view) { $expr = null; - $line = null; $level = 0; $php = 0; $str = null; -- cgit v1.2.3