SF.net SVN: postfixadmin:[902] trunk/functions.inc.php
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2010-12-25 14:57:41
|
Revision: 902 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=902&view=rev Author: christian_boltz Date: 2010-12-25 14:57:35 +0000 (Sat, 25 Dec 2010) Log Message: ----------- functions.inc.php: - check_domain(): don't trim() the domain - whitespace is an error. This catches "foo@ domain.com" that wasn't catched before. Modified Paths: -------------- trunk/functions.inc.php Modified: trunk/functions.inc.php =================================================================== --- trunk/functions.inc.php 2010-12-25 14:50:26 UTC (rev 901) +++ trunk/functions.inc.php 2010-12-25 14:57:35 UTC (rev 902) @@ -229,7 +229,7 @@ global $CONF; 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))); return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |