|
From: Meik S. <acy...@us...> - 2007-09-22 18:28:17
|
Update of /cvsroot/phpbb/phpBB2/adm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9056/adm Modified Files: swatch.php Log Message: #i62 - #i65 gone through every javascript invocation and making sure we adhere to our coding guidelines. Index: swatch.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/adm/swatch.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** swatch.php 18 Sep 2007 14:47:38 -0000 1.13 --- swatch.php 22 Sep 2007 18:28:19 -0000 1.14 *************** *** 30,36 **** ); $template->assign_vars(array( ! 'OPENER' => addslashes(request_var('form', '')), ! 'NAME' => request_var('name', ''), 'T_IMAGES_PATH' => "{$phpbb_root_path}images/", --- 30,43 ---- ); + $form = request_var('form', ''); + $name = request_var('name', ''); + + // We validate form and name here, only id/class allowed + $form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form; + $name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name; + $template->assign_vars(array( ! 'OPENER' => $form, ! 'NAME' => $name, 'T_IMAGES_PATH' => "{$phpbb_root_path}images/", |