alecpl
2010-03-03 aba0927545d3bd9998cbcf6bbc2a0b6bfd8d0318
- Fix long e-mail addresses validation (#1486453)


2 files modified
9 ■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/include/main.inc 8 ●●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail
===========================
- Fix long e-mail addresses validation (#1486453)
- Remember search modifiers in user prefs (#1486146)
- Added force_7bit option to force MIME encoding of plain/text messages (#1486510)
- Use case sensitive check when checking for default folders (#1486346)
program/include/main.inc
@@ -1511,8 +1511,12 @@
  if (preg_match('/[\x00-\x1F\x7F-\xFF]/', $email))
    return false;
  // Check that there's one @ symbol, and that the lengths are right
  if (!preg_match('/^([^@]{1,64})@([^@]{1,255})$/', $email, $email_array))
  // Check for length limit specified by RFC 5321 (#1486453)
  if (strlen($email) > 254)
    return false;
  // Check that there's one @ symbol
  if (!preg_match('/^([^@]+)@([^@]+)$/', $email, $email_array))
    return false;
  // Check local part