summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ef1c243)
raw | patch | inline | side by side (parent: ef1c243)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 27 Aug 2010 15:09:15 +0000 (15:09 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 27 Aug 2010 15:09:15 +0000 (15:09 +0000) |
-Do not accept spaces or special chars in mail addresses
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@19484 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@19484 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/mail/personal/mail/class_mailAccount.inc | patch | blob | history |
diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc
index 1cf306a63fe880d45b601ca281c63f9920870ae0..09de8c346ad553f5a918196c9bbe7c356996fbc7 100644 (file)
$value= preg_replace ("/%$repl/i", $this->parent->$repl, $value);
}
}
+ $value = iconv('UTF-8', 'US-ASCII//TRANSLIT', $value);
+ $value = preg_replace('/[^(\x20-\x7F)]*/','',$value);
+ $value = preg_replace("/[ ]/","", $value);
array_push($this->$val, strtolower(rewrite($value)));
}
}
}
$this->mail= strtolower(rewrite($this->mail));
+ $this->mail= iconv('UTF-8', 'US-ASCII//TRANSLIT', $this->mail);
+ $this->mail= preg_replace('/[^(\x20-\x7F)]*/','',$this->mail);
+ $this->mail= preg_replace("/[ ]/","", $this->mail);
// Fix mail address when using templates
if($this->is_account && $this->mailMethod->domainSelectionEnabled()){