From: psc Date: Mon, 19 Oct 2009 17:28:07 +0000 (+0000) Subject: Followup commit for Trac #3115 X-Git-Url: https://git.tokkee.org/?p=gosa.git;a=commitdiff_plain;h=dc89950ecafb7346a00bd39efd215447d064668d Followup commit for Trac #3115 - Allow . in server names as well - Remove useless _ in list of allowed characters, because its included by \w - Include optional port in the stated syntax in the error message git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@14606 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/trunk/gosa-plugins/goto/admin/systems/services/ldap/class_goLdapServer.inc b/trunk/gosa-plugins/goto/admin/systems/services/ldap/class_goLdapServer.inc index a372071a5..f35b59791 100644 --- a/trunk/gosa-plugins/goto/admin/systems/services/ldap/class_goLdapServer.inc +++ b/trunk/gosa-plugins/goto/admin/systems/services/ldap/class_goLdapServer.inc @@ -78,9 +78,9 @@ class goLdapServer extends goService{ if(empty($this->goLdapBase)){ $message[] = msgPool::required(_("Base")); } - if(!preg_match("/^ldap[si]?:\/\/[\w-:_]+\/.+$/", $this->goLdapBase)){ + if(!preg_match("/^ldap[si]?:\/\/[\w-:.]+\/.+$/", $this->goLdapBase)){ $err = _('The specified LDAP URI is incorrectly formatted.'); - $err .= "

"._("Example").": ". "ldap[si]://server/base"; + $err .= "

"._("Example").": ". "ldap[si]://server[:port]/base"; $message[] = $err; }