summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 59bd2f5)
raw | patch | inline | side by side (parent: 59bd2f5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 Sep 2005 06:50:20 +0000 (06:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 Sep 2005 06:50:20 +0000 (06:50 +0000) |
disallow everything else as a-z0-9 for uid,
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1369 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1369 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/generic/class_user.inc | patch | blob | history |
index 9f216a9575fa82dec047d274cdf18a5de813796d..8749a6627732d72e5c1382e93800841d88b27d0b 100644 (file)
/* Assemble cn */
$this->cn= $this->givenName." ".$this->sn;
+ if(preg_match("/[^a-z0-9]/",$this->uid)){
+ $message[]=_("Invalid characters in uid.") ;
+ }
+
/* Permissions for that base? */
if (isset($this->config->current['DNMODE']) && $this->config->current['DNMODE'] == "uid"){
$new_dn= 'uid='.$this->uid.','.get_people_ou().$this->base;
}
/* Check for reserved characers */
- if (preg_match ('/[,+"?\'()-=<>;]/', $this->givenName)){
+ if (preg_match ('/[,+"?\'()=<>;]/', $this->givenName)){
$message[]= _("The field 'Given name' contains invalid characters.");
- }
- if (preg_match ('/[,+"?\'()-=<>;]/', $this->sn)){
- $message[]= _("The field 'Name' contains invalid characters.");
- }
+ }
+ if (preg_match ('/[,+"?\'()=<>;]/', $this->sn)){
+ $message[]= _("The field 'Name' contains invalid characters.");
+ }
return $message;
}