瀏覽代碼

Weakening email validation so redirects on tld will work again, users should know what they are doing

ohartl 9 年之前
父節點
當前提交
4d8143eb0d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/php/pages/admin/editredirect.php

+ 1 - 1
include/php/pages/admin/editredirect.php

@@ -30,7 +30,7 @@ if(isset($_POST['savemode'])){
 
 	// basic email validation isn't working 100% correct though
 	foreach(array_merge($inputSources, $inputDestinations) as $email){
-		if(!filter_var($email, FILTER_VALIDATE_EMAIL)){
+		if(strpos($email, '@') === false){
 			$emailErrors[$email] = "Address \"{$email}\" isn't a valid email address.";
 		}
 	}