From 373e8817f82014fcde11157ed0d5e75eb77a5cb4 Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Fri, 8 Aug 2014 10:55:34 +0200 Subject: [PATCH] Fixed: FS#3603 - system.inc.php:1827 is_allowed_user regex typo? --- interface/lib/classes/functions.inc.php | 4 ++-- server/lib/classes/system.inc.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php index e37edda975..2d87c63344 100644 --- a/interface/lib/classes/functions.inc.php +++ b/interface/lib/classes/functions.inc.php @@ -430,7 +430,7 @@ class functions { $name_blacklist = array('root','ispconfig','vmail','getmail'); if(in_array($username,$name_blacklist)) return false; - if(preg_match('/^[a-zA-Z0-9\.\-]{1,32}$/', $username) == false) return false; + if(preg_match('/^[a-zA-Z0-9\.\-_]{1,32}$/', $username) == false) return false; if($restrict_names == true && preg_match('/^web\d+$/', $username) == false) return false; @@ -443,7 +443,7 @@ class functions { $name_blacklist = array('root','ispconfig','vmail','getmail'); if(in_array($groupname,$name_blacklist)) return false; - if(preg_match('/^[a-zA-Z0-9\.\-]{1,32}$/', $groupname) == false) return false; + if(preg_match('/^[a-zA-Z0-9\.\-_]{1,32}$/', $groupname) == false) return false; if($restrict_names == true && preg_match('/^client\d+$/', $groupname) == false) return false; diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index 20d4f93a1c..af42e5ec31 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -1824,7 +1824,7 @@ class system{ $name_blacklist = array('root','ispconfig','vmail','getmail'); if(in_array($username,$name_blacklist)) return false; - if(preg_match('/^[a-zA-Z0-9\.\-]{1,32}$/', $username) == false) return false; + if(preg_match('/^[a-zA-Z0-9\.\-_]{1,32}$/', $username) == false) return false; if($check_id && intval($this->getuid($username)) < $this->min_uid) return false; @@ -1839,7 +1839,7 @@ class system{ $name_blacklist = array('root','ispconfig','vmail','getmail'); if(in_array($groupname,$name_blacklist)) return false; - if(preg_match('/^[a-zA-Z0-9\.\-]{1,32}$/', $groupname) == false) return false; + if(preg_match('/^[a-zA-Z0-9\.\-_]{1,32}$/', $groupname) == false) return false; if($check_id && intval($this->getgid($groupname)) < $this->min_gid) return false; -- GitLab