From: Stefan Date: Fri, 2 Sep 2016 15:41:02 +0000 (+0200) Subject: Add length check for mail address X-Git-Tag: 3.0.0_Beta_1~322^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ae2dd1d255b360ab819f8195fa88188012ba47f6;p=GitHub%2FWoltLab%2FWCF.git Add length check for mail address --- diff --git a/wcfsetup/install/files/lib/util/UserUtil.class.php b/wcfsetup/install/files/lib/util/UserUtil.class.php index ab00d6e2a2..a630ba1e87 100644 --- a/wcfsetup/install/files/lib/util/UserUtil.class.php +++ b/wcfsetup/install/files/lib/util/UserUtil.class.php @@ -66,6 +66,10 @@ final class UserUtil { * @return boolean */ public static function isValidEmail($email) { + if (mb_strlen($email) > 191) { + return false; + } + // local-part $c = '!#\$%&\'\*\+\-\/0-9=\?a-z\^_`\{\}\|~'; $string = '['.$c.']*(?:\\\\[\x00-\x7F]['.$c.']*)*';