From fd9b28d91740d868edde9e52d720de2fe28eb090 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 3 Aug 2003 13:29:44 +0000 Subject: [PATCH] fixed checking of script path --- lam/lib/config.inc | 2 +- lam/templates/config/confsave.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lam/lib/config.inc b/lam/lib/config.inc index 49193d0b..32a3d342 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -734,7 +734,7 @@ class Config { // sets the path to the external script function set_scriptPath($value) { if (!$value) $this->scriptPath = ""; // optional parameter - elseif (is_string($value) && eregi("^/([a-z0-9_\\-])+(/([a-z0-9_\\-])+)+$", $value)) $this->scriptPath = $value; + elseif (is_string($value) && eregi("^/([a-z0-9_\\-])+(/([a-z0-9_\\.\\-])+)+$", $value)) $this->scriptPath = $value; else return false; return true; } diff --git a/lam/templates/config/confsave.php b/lam/templates/config/confsave.php index 9462b1d0..3076fef4 100644 --- a/lam/templates/config/confsave.php +++ b/lam/templates/config/confsave.php @@ -182,7 +182,7 @@ if (($samba3 == "yes") && !eregi("^S-[0-9]-[0-9]-[0-9]{2,2}-[0-9]*-[0-9]*-[0-9]* exit; } -if ($scriptpath && !eregi("^/[a-z0-9_\\-]+(/[a-z0-9_\\-]+)+$", $scriptpath)) { +if ($scriptpath && !eregi("^/[a-z0-9_\\-]+(/[a-z0-9_\\.\\-]+)+$", $scriptpath)) { echo ("" . _("Script path is invalid!") . ""); echo ("\n


" . _("Back to preferences...") . ""); exit;