From 492b181d5123bd8a47339c9bdfc9cae3e1b3319c Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sun, 9 Oct 2016 19:31:24 +0200 Subject: [PATCH 01/14] SQL, upgrade: increase session table ip field size for IPv6 addresses Commit 84d06edb06 introduced IPv6 support on SQL session table but failed at providing upgrade SQL scripts, this commit fixes it. Fixes: 84d06edb06 ("IPv6 Compatability") Signed-off-by: Sylvain Rochet --- SQL/mssql/2016100900.sql | 2 ++ SQL/mysql/2016100900.sql | 1 + SQL/oracle/2016100900.sql | 1 + SQL/postgres/2016100900.sql | 1 + 4 files changed, 5 insertions(+) create mode 100644 SQL/mssql/2016100900.sql create mode 100644 SQL/mysql/2016100900.sql create mode 100644 SQL/oracle/2016100900.sql create mode 100644 SQL/postgres/2016100900.sql diff --git a/SQL/mssql/2016100900.sql b/SQL/mssql/2016100900.sql new file mode 100644 index 00000000000..38b359a4808 --- /dev/null +++ b/SQL/mssql/2016100900.sql @@ -0,0 +1,2 @@ +ALTER TABLE [dbo].[session] ALTER COLUMN [ip] [varchar] (40) COLLATE Latin1_General_CI_AI NOT NULL +GO diff --git a/SQL/mysql/2016100900.sql b/SQL/mysql/2016100900.sql new file mode 100644 index 00000000000..ea096e9f90a --- /dev/null +++ b/SQL/mysql/2016100900.sql @@ -0,0 +1 @@ +ALTER TABLE `session` MODIFY `ip` varchar(40) NOT NULL; diff --git a/SQL/oracle/2016100900.sql b/SQL/oracle/2016100900.sql new file mode 100644 index 00000000000..e92e7eb91fc --- /dev/null +++ b/SQL/oracle/2016100900.sql @@ -0,0 +1 @@ +ALTER TABLE session MODIFY ip varchar(41) NOT NULL; diff --git a/SQL/postgres/2016100900.sql b/SQL/postgres/2016100900.sql new file mode 100644 index 00000000000..8eb7eedacb3 --- /dev/null +++ b/SQL/postgres/2016100900.sql @@ -0,0 +1 @@ +ALTER TABLE session ALTER COLUMN ip TYPE character varying(41); From b258b91560d0fd4e00495a1263843e0d572c56ce Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 11 Oct 2016 09:47:06 +0200 Subject: [PATCH 02/14] Do not show inline images of unsupported mimetype (#5463) --- CHANGELOG | 1 + program/lib/Roundcube/html.php | 2 +- program/steps/mail/func.inc | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0e698307324..63d6476b8f8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Do not show inline images of unsupported mimetype (#5463) - Password: Added LDAP PPolicy driver (#5364) - Implement separate action to mark all messages in a folder as \Seen (#5006) - Implement marking as \Seen in all folders or in a folder and its subfolders (#5076) diff --git a/program/lib/Roundcube/html.php b/program/lib/Roundcube/html.php index 73b9a85d7a5..2cad9df9953 100644 --- a/program/lib/Roundcube/html.php +++ b/program/lib/Roundcube/html.php @@ -163,7 +163,7 @@ public static function img($attr = null) } return self::tag('img', $attr + array('alt' => ''), null, array_merge(self::$common_attrib, - array('src','alt','width','height','border','usemap','onclick','onerror'))); + array('src','alt','width','height','border','usemap','onclick','onerror','onload'))); } /** diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index dc6b4d24c99..b3f60c93885 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1322,6 +1322,7 @@ function rcmail_message_body($attrib) if ($mimetype = rcmail_part_image_type($attach_prop)) { // display thumbnails if ($thumbnail_size) { + $supported = in_array($mimetype, $client_mimetypes); $show_link = array( 'href' => $MESSAGE->get_part_url($attach_prop->mime_id, false), 'onclick' => sprintf( @@ -1329,7 +1330,8 @@ function rcmail_message_body($attrib) rcmail_output::JS_OBJECT_NAME, $attach_prop->mime_id) ); - $out .= html::p('image-attachment', + + $out .= html::p(array('class' => 'image-attachment', 'style' => $supported ? '' : 'display:none'), html::a($show_link + array('class' => 'image-link', 'style' => sprintf('width:%dpx', $thumbnail_size)), html::img(array( 'class' => 'image-thumbnail', @@ -1337,12 +1339,13 @@ function rcmail_message_body($attrib) 'title' => $attach_prop->filename, 'alt' => $attach_prop->filename, 'style' => sprintf('max-width:%dpx; max-height:%dpx', $thumbnail_size, $thumbnail_size), + 'onload' => $supported ? '' : '$(this).parents(\'p.image-attachment\').show()', )) ) . html::span('image-filename', rcube::Q($attach_prop->filename)) . html::span('image-filesize', rcube::Q($RCMAIL->message_part_size($attach_prop))) . html::span('attachment-links', - (in_array($mimetype, $client_mimetypes) ? html::a($show_link, $RCMAIL->gettext('showattachment')) . ' ' : '') . + ($supported ? html::a($show_link, $RCMAIL->gettext('showattachment')) . ' ' : '') . html::a($show_link['href'] . '&_download=1', $RCMAIL->gettext('download')) ) . html::br(array('style' => 'clear:both')) From ea816a062a4b64cbd1c680becd69a8fc26cd1b24 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Tue, 11 Oct 2016 16:12:03 +0200 Subject: [PATCH 03/14] Fix flickering of header topline in min-mode (#5426) --- skins/larry/includes/footer.html | 11 ----------- skins/larry/includes/header.html | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/skins/larry/includes/footer.html b/skins/larry/includes/footer.html index 6cd3e62d133..cade440bd6b 100644 --- a/skins/larry/includes/footer.html +++ b/skins/larry/includes/footer.html @@ -1,13 +1,2 @@ - diff --git a/skins/larry/includes/header.html b/skins/larry/includes/header.html index 72a02f26803..5efe5b60043 100644 --- a/skins/larry/includes/header.html +++ b/skins/larry/includes/header.html @@ -1,3 +1,15 @@ + +