functions.inc.php:

- check_domain(): don't trim() the domain - whitespace is an error.
  This catches "foo@ domain.com" that wasn't catched before.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@902 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 14 years ago
parent f4957b8bb2
commit 623d992091

@ -229,7 +229,7 @@ function check_domain ($domain)
global $CONF; global $CONF;
global $PALANG; global $PALANG;
if (!preg_match ('/([-0-9A-Z]+\.)+' . '([0-9A-Z]){2,6}$/i', trim ($domain))) if (!preg_match ('/^([-0-9A-Z]+\.)+' . '([0-9A-Z]){2,6}$/i', ($domain)))
{ {
flash_error(sprintf($PALANG['pInvalidDomainRegex'], htmlentities($domain))); flash_error(sprintf($PALANG['pInvalidDomainRegex'], htmlentities($domain)));
return false; return false;

Loading…
Cancel
Save