diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2012-09-09 20:23:56 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2012-09-09 20:23:56 +0200 |
commit | 99d9f50a0000447d0a752e6c43716237dc0da176 (patch) | |
tree | 0b958b9711d09c4da74f076e1b902ffa32a4a0a1 /program/js/common.js | |
parent | a1303514933afe2d867067e4b95412c79652c89b (diff) | |
parent | 4e383e2ec8b4184c0fe74d02cf30fd3a4078128e (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/js/common.js')
-rw-r--r-- | program/js/common.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/program/js/common.js b/program/js/common.js index fdef3453e..f9e945c05 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -494,12 +494,15 @@ function rcube_check_email(input, inline) atom = '[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+', quoted_pair = '\\x5c[\\x00-\\x7f]', quoted_string = '\\x22('+qtext+'|'+quoted_pair+')*\\x22', + ipv4 = '\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}\\]', + ipv6 = '\\[IPv6:[0-9a-f:.]+\\]', + ip_addr = '(' + ipv4 + ')|(' + ipv6 + ')', // Use simplified domain matching, because we need to allow Unicode characters here // So, e-mail address should be validated also on server side after idn_to_ascii() use //domain_literal = '\\x5b('+dtext+'|'+quoted_pair+')*\\x5d', //sub_domain = '('+atom+'|'+domain_literal+')', // allow punycode/unicode top-level domain - domain = '([^@\\x2e]+\\x2e)+([^\\x00-\\x40\\x5b-\\x60\\x7b-\\x7f]{2,}|xn--[a-z0-9]{2,})', + domain = '(('+ip_addr+')|(([^@\\x2e]+\\x2e)+([^\\x00-\\x40\\x5b-\\x60\\x7b-\\x7f]{2,}|xn--[a-z0-9]{2,})))', // ICANN e-mail test (http://idn.icann.org/E-mail_test) icann_domains = [ '\\u0645\\u062b\\u0627\\u0644\\x2e\\u0625\\u062e\\u062a\\u0628\\u0627\\u0631', @@ -527,7 +530,6 @@ function rcube_check_email(input, inline) return false; }; - // recursively copy an object function rcube_clone_object(obj) { @@ -635,6 +637,7 @@ function getCookie(name) return unescape(dc.substring(begin + prefix.length, end)); }; +// deprecated aliases, to be removed, use rcmail.set_cookie/rcmail.get_cookie roundcube_browser.prototype.set_cookie = setCookie; roundcube_browser.prototype.get_cookie = getCookie; |