From 037af6890fe6fdb84a08d3c86083e847c90ec0ad Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 22 Oct 2013 08:17:26 -0400
Subject: [PATCH] Fix vulnerability in handling _session argument of utils/save-prefs (#1489382)

---
 skins/classic/functions.js |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/skins/classic/functions.js b/skins/classic/functions.js
index cb3e293..23c6980 100644
--- a/skins/classic/functions.js
+++ b/skins/classic/functions.js
@@ -492,6 +492,9 @@
   div.style.top = (parseInt(headers_div.offsetHeight, 10) + 3) + 'px';
   $(window).resize();
 
+  // fixes contacts-table position when there's more than one addressbook
+  $('#contacts-table').css('top', $('#directorylist').height() + 24 + 'px');
+
   // contacts search submit
   $('#quicksearchbox').keydown(function(e) {
     if (rcube_event.get_keycode(e) == 13)
@@ -503,7 +506,7 @@
 {
   var div = $('#compose-div .boxlistcontent'),
     w = div.width() - 2, h = div.height(),
-    x = bw.ie ? 4 : 0;
+    x = bw.ie || bw.opera ? 4 : 0;
 
   $('#compose-body_tbl').width((w+3)+'px').height('');
   $('#compose-body_ifr').width((w+3)+'px').height((h-54)+'px');
@@ -631,8 +634,13 @@
 function iframe_events()
 {
   // this==iframe
-  var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null;
-  rcube_event.add_listener({ element: doc, object:rcmail_ui, method:'body_mouseup', event:'mouseup' });
+  try {
+    var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null;
+    rcube_event.add_listener({ element: doc, object:rcmail_ui, method:'body_mouseup', event:'mouseup' });
+  }
+  catch (e) {
+    // catch possible "Permission denied" error in IE
+  };
 };
 
 // Abbreviate mailbox names to fit width of the container

--
Gitblit v1.9.1