alecpl
2010-03-05 e55ab02682caf150359e1d1642022b565e9e65f9
program/include/main.inc
@@ -1487,10 +1487,18 @@
    return true;
  if ($port && $_SERVER['SERVER_PORT'] == $port)
    return true;
  if ($use_https && $RCMAIL->config->get('use_https'))
  if ($use_https && isset($RCMAIL) && $RCMAIL->config->get('use_https'))
    return true;
  return false;
}
// for backward compatibility
function rcube_sess_unset($var_name=null)
{
  global $RCMAIL;
  $RCMAIL->session->remove($var_name);
}
@@ -1503,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