fixed problems pointed out by enricomilanese-AT-gmail.com

This commit is contained in:
Ralf Becker 2007-09-16 06:51:13 +00:00
parent 4682133d82
commit 6ec9f61226
2 changed files with 4 additions and 0 deletions

View File

@ -314,6 +314,8 @@
function edit()
{
if (!preg_match('/^(#[0-9a-f]+|[a-z]+)?$/i',$_POST['cat_data']['color'])) unset($_POST['cat_data']['color']);
if (!preg_match('/^[-_\.a-z0-9]+\.(png|gif|jpe?g)$/i',$_POST['cat_data']['icon'])) unset($_POST['cat_data']['icon']);
$new_parent = (int)$_POST['new_parent'];
$cat_parent = (int)$_POST['cat_parent'];
$cat_name = $_POST['cat_name'];

View File

@ -331,6 +331,8 @@
'cats_level' => $cats_level,
'cat_id' => $cat_id
);
if (!preg_match('/^(#[0-9a-f]+|[a-z]+)?$/i',$_POST['cat_data']['color'])) unset($_POST['cat_data']['color']);
if (!preg_match('/^[-_\.a-z0-9]+\.(png|gif|jpe?g)$/i',$_POST['cat_data']['icon'])) unset($_POST['cat_data']['icon']);
$new_parent = $_POST['new_parent'];
$cat_parent = $_POST['cat_parent'];
$cat_name = $_POST['cat_name'];