diff --git a/lam/lib/config.inc b/lam/lib/config.inc index c5924f12..91c00745 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -494,7 +494,7 @@ class Config { // needs a string that contains all admin users seperated by semicolons function set_Adminstring($value) { if (is_string($value) && - ereg("^([a-zA-Z0-9]|-)+=([a-zA-Z0-9]|-)+(,([a-zA-Z0-9]|-)+=([a-zA-Z0-9]|-)+)+(;([a-zA-Z0-9]|-)+=([a-zA-Z0-9]|-)+(,([a-zA-Z0-9]|-)+=([a-zA-Z0-9]|-)+)+)*$", $value)) { + eregi("^([a-z0-9]|-)+=([a-z0-9]|-)+(,([a-z0-9]|-)+=([a-z0-9]|-)+)+(;([a-z0-9]|-)+=([a-z0-9]|-)+(,([a-z0-9]|-)+=([a-z0-9]|-)+)+)*$", $value)) { $this->Adminstring = $value; $this->Admins = explode(";", $value); } @@ -713,8 +713,8 @@ class Config { // sets the path to the external script function set_scriptPath($value) { - if (!$value) $value = ""; // optional parameter - if (is_string($value) && eregi("^()|(/([a-z]|[0-9]|-|_|/)*)$", $value)) $this->scriptPath = $value; + if (!$value) $this->scriptPath = ""; // optional parameter + elseif (is_string($value) && eregi("^/([a-z0-9_\\-])+(/([a-z0-9_\\-])+)+$", $value)) $this->scriptPath = $value; else StatusMessage("WARN", "", _("Config->set_scriptPath failed!") . " (" . $value . ")"); } @@ -726,7 +726,7 @@ class Config { // sets the server of the external script function set_scriptServer($value) { if (!$value) $value = ""; // optional parameter - if (is_string($value) && (eregi("^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$", $value) || $value == "")) { + if (is_string($value)) { $this->scriptServer = $value; } else StatusMessage("WARN", "", _("Config->set_scriptServer failed!") . " (" . $value . ")"); diff --git a/lam/templates/config/confmain.php b/lam/templates/config/confmain.php index 07d6865f..6222e73e 100644 --- a/lam/templates/config/confmain.php +++ b/lam/templates/config/confmain.php @@ -46,6 +46,8 @@ if ($_POST['back'] || $_POST['submitconf']){ if ($_POST['suffusers']) $suffusers = $_POST['suffusers']; if ($_POST['suffgroups']) $suffgroups = $_POST['suffgroups']; if ($_POST['suffhosts']) $suffhosts = $_POST['suffhosts']; + if ($_POST['suffdomains']) $suffdomains = $_POST['suffdomains']; + if ($_POST['suffmap']) $suffmap = $_POST['suffmap']; if ($_POST['minUID']) $minUID = $_POST['minUID']; if ($_POST['maxUID']) $maxUID = $_POST['maxUID']; if ($_POST['minGID']) $minGID = $_POST['minGID']; @@ -66,9 +68,9 @@ if ($_POST['back'] || $_POST['submitconf']){ else $scriptserver = ""; if ($_POST['filename']) $filename = $_POST['filename']; session_register('passwd', 'passwd1', 'passwd2', 'serverurl', 'admins', 'suffusers', - 'suffgroups', 'suffhosts', 'minUID', 'maxUID', 'minGID', 'maxGID', 'minMach', - 'maxMach', 'usrlstattr', 'grplstattr', 'hstlstattr', 'maxlistentries', 'lang', - 'scriptpath', 'scriptserver', 'samba3', 'domainSID', 'filename'); + 'suffgroups', 'suffhosts', 'suffdomains', 'suffmap', 'minUID', 'maxUID', 'minGID', + 'maxGID', 'minMach', 'maxMach', 'usrlstattr', 'grplstattr', 'hstlstattr', 'maxlistentries', + 'lang', 'scriptpath', 'scriptserver', 'samba3', 'domainSID', 'filename'); echo(""); } // back to login @@ -117,7 +119,7 @@ echo ("