From: hickert Date: Mon, 17 May 2010 06:44:56 +0000 (+0000) Subject: Updated sudo plugin X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=91753c24b1ddabc6c46ebc16a08c9ab16ddb1e44;p=gosa.git Updated sudo plugin -Allow to add special characters in sudoHost,User & RunAs It is now allowed to use *+-!| git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18484 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc b/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc index a653edf0d..7617b9563 100644 --- a/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc +++ b/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc @@ -283,12 +283,14 @@ class sudo extends plugin isset($_POST["add_".$attr]) && isset($_POST['new_'.$attr]) && !empty($_POST['new_'.$attr])){ - if(preg_match("/^[a-z\.0-9]*$/i",$_POST['new_'.$attr])){ + + $c = preg_quote('’ *+-?_|!\'"()','/'); + if(preg_match("/^[a-z0-9{$c}]*$/i",$_POST['new_'.$attr])){ $attrs = $this->$attr; $attrs[] = trim($_POST['new_'.$attr]); $this->$attr = $attrs; }else{ - msg_dialog::display(_("Error"),msgPool::invalid($attr,$_POST['new_'.$attr],"/[a-z0-9]/")); + msg_dialog::display(_("Error"),msgPool::invalid($attr,$_POST['new_'.$attr],"/[a-z0-9{$c}]/i")); } } }