Add length check for mail address
authorStefan <Stefan_Hahn1@gmx.net>
Fri, 2 Sep 2016 15:41:02 +0000 (17:41 +0200)
committerStefan <Stefan_Hahn1@gmx.net>
Fri, 2 Sep 2016 15:41:02 +0000 (17:41 +0200)
wcfsetup/install/files/lib/util/UserUtil.class.php

index ab00d6e2a2e49b8e113d357059514d9d7c087c7f..a630ba1e873a531e4451b2b37c35ef21ac095214 100644 (file)
@@ -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.']*)*';