From a05bcd4926642607d259bae97250a852580eb3ea Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 24 Aug 2012 02:38:07 -0400
Subject: [PATCH] Merge branch 'master' of github.com:roundcube/roundcubemail

---
 CHANGELOG                |    2 ++
 program/js/common.js     |    4 ++--
 skins/larry/ie7hacks.css |   10 ++++++++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 784bbc8..d529169 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,8 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Fix email address validation for addresses with IP address in domain part
+- Fix Larry skin issues in IE7 compat. mode (#1488618)
 - Fix so subscribed non-existing/non-accessible shared folder can be unsubscribed
 - Added session_path config option and unified cookies settings in javascript
 - Added "Undeleted" option to messages list filter
diff --git a/program/js/common.js b/program/js/common.js
index a08387e..2d8d9e1 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -494,12 +494,13 @@
       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',
+      ip_addr = '\\[*(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}\\]*',
       // 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',
@@ -526,7 +527,6 @@
 
   return false;
 };
-
 
 // recursively copy an object
 function rcube_clone_object(obj)
diff --git a/skins/larry/ie7hacks.css b/skins/larry/ie7hacks.css
index 6161d03..024c35b 100644
--- a/skins/larry/ie7hacks.css
+++ b/skins/larry/ie7hacks.css
@@ -7,10 +7,16 @@
  * License. It is allowed to copy, distribute, transmit and to adapt the work
  * by keeping credits to the original autors in the README file.
  * See http://creativecommons.org/licenses/by-sa/3.0/ for details.
- *
- * $Id$
  */
 
+/* #1488618 */
+#mainscreen {
+  height: expression((parseInt(document.documentElement.clientHeight)-108)+'px');
+}
+#mainscreen.offset {
+  height: expression((parseInt(document.documentElement.clientHeight)-150)+'px');
+}
+
 input.button {
 	display: inline;
 	font-size: 90%;

--
Gitblit v1.9.1