From bcf63b670031faf14785a71bdc8978b6a23e9ce2 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Fri, 21 Oct 2022 12:48:33 +0200 Subject: [PATCH] v2.19.2 --- .../files/usr/local/include/application.ini | 2 +- build/nextcloud.php | 3 ++ dev/Common/Html.js | 45 ++++++++++--------- dev/Styles/User/MessageView.less | 2 +- integrations/cloudron/DESCRIPTION.md | 2 +- integrations/cloudron/Dockerfile | 2 +- .../nextcloud/snappymail/appinfo/info.xml | 2 +- integrations/virtualmin/snappymail.pl | 2 +- package.json | 2 +- plugins/nextcloud/index.php | 2 +- .../app/libraries/RainLoop/ServiceActions.php | 12 ++--- 11 files changed, 40 insertions(+), 36 deletions(-) diff --git a/.docker/release/files/usr/local/include/application.ini b/.docker/release/files/usr/local/include/application.ini index 86908f2c2..5b4818952 100644 --- a/.docker/release/files/usr/local/include/application.ini +++ b/.docker/release/files/usr/local/include/application.ini @@ -290,5 +290,5 @@ dev_email = "" dev_password = "" [version] -current = "2.18.6" +current = "2.19.2" saved = "Fri, 30 Sep 2022 12:34:56 +0000" diff --git a/build/nextcloud.php b/build/nextcloud.php index ce3e47023..6620f3a9f 100755 --- a/build/nextcloud.php +++ b/build/nextcloud.php @@ -37,4 +37,7 @@ $nc_tar->compress(Phar::GZ); unlink($nc_destination); $nc_destination .= '.gz'; +$signature = shell_exec("openssl dgst -sha512 -sign ~/.nextcloud/certificates/snappymail.key {$nc_destination} | openssl base64"); +file_put_contents($nc_destination.'.sig', $signature); + echo "{$nc_destination} created\n"; diff --git a/dev/Common/Html.js b/dev/Common/Html.js index 192ad10fb..6f53d44f0 100644 --- a/dev/Common/Html.js +++ b/dev/Common/Html.js @@ -291,28 +291,7 @@ export const if ('IMG' === name) { oElement.loading = 'lazy'; let attachment; - if (detectHiddenImages - && ((oStyle.maxHeight && 3 > pInt(oStyle.maxHeight)) - || (oStyle.maxWidth && 3 > pInt(oStyle.maxWidth)) - || [ - 'email.microsoftemail.com/open', - 'github.com/notifications/beacon/', - '/track/open', // mandrillapp.com list-manage.com - 'google-analytics.com' - ].filter(uri => value.toLowerCase().includes(uri)).length - )) { - skipStyle = true; - setAttribute('style', 'display:none'); - setAttribute('data-x-src-hidden', value); - } - else if ((attachment = findLocationByCid(value))) - { - if (attachment.download) { - oElement.src = attachment.linkPreview(); - attachment.isLinked(true); - } - } - else if ('cid:' === value.slice(0, 4)) + if ('cid:' === value.slice(0, 4)) { value = value.slice(4); setAttribute('data-x-src-cid', value); @@ -324,6 +303,28 @@ export const attachment.isLinked(true); } } + else if ((attachment = findLocationByCid(value))) + { + if (attachment.download) { + oElement.src = attachment.linkPreview(); + attachment.isLinked(true); + } + } + else if (detectHiddenImages + && ((oStyle.maxHeight && 3 > pInt(oStyle.maxHeight)) // TODO: issue with 'in' + || (oStyle.maxWidth && 3 > pInt(oStyle.maxWidth)) // TODO: issue with 'in' + || [ + 'email.microsoftemail.com/open', + 'github.com/notifications/beacon/', + '/track/open', // mandrillapp.com list-manage.com + 'google-analytics.com' + ].filter(uri => value.toLowerCase().includes(uri)).length + )) { + skipStyle = true; + oStyle.display = 'none'; +// setAttribute('style', 'display:none'); + setAttribute('data-x-src-hidden', value); + } else if (httpre.test(value)) { setAttribute('data-x-src', value); diff --git a/dev/Styles/User/MessageView.less b/dev/Styles/User/MessageView.less index b88924f67..68a92b14b 100644 --- a/dev/Styles/User/MessageView.less +++ b/dev/Styles/User/MessageView.less @@ -400,6 +400,7 @@ html.rl-no-preview-pane { img[data-x-src]:not([src])::after { content: "🖼"; font-family: snappymail; + line-height: 1; position: absolute; top: 0; left: 0; @@ -411,7 +412,6 @@ html.rl-no-preview-pane { font-family: var(--fontSans); font-size: 11px; height: auto; - line-height: 1; transform: translate(-25%,0); width: auto; width: -moz-fit-content; diff --git a/integrations/cloudron/DESCRIPTION.md b/integrations/cloudron/DESCRIPTION.md index de1125c82..3f22a4ff4 100644 --- a/integrations/cloudron/DESCRIPTION.md +++ b/integrations/cloudron/DESCRIPTION.md @@ -1,4 +1,4 @@ -This app packages SnappyMail 2.18.6. +This app packages SnappyMail 2.19.2. SnappyMail is a simple, modern, lightweight & fast web-based email client. diff --git a/integrations/cloudron/Dockerfile b/integrations/cloudron/Dockerfile index 1fcde6d61..04afbf0bf 100644 --- a/integrations/cloudron/Dockerfile +++ b/integrations/cloudron/Dockerfile @@ -4,7 +4,7 @@ RUN mkdir -p /app/code WORKDIR /app/code # If you change the extraction below, be sure to test on scaleway -VERSION=2.18.6 +VERSION=2.19.2 RUN wget https://github.com/the-djmaze/snappymail/releases/download/v${VERSION}/snappymail-${VERSION}.zip -O /tmp/snappymail.zip && \ unzip /tmp/snappymail.zip -d /app/code && \ rm /tmp/snappymail.zip && \ diff --git a/integrations/nextcloud/snappymail/appinfo/info.xml b/integrations/nextcloud/snappymail/appinfo/info.xml index 3ab5ad369..583b1cd80 100644 --- a/integrations/nextcloud/snappymail/appinfo/info.xml +++ b/integrations/nextcloud/snappymail/appinfo/info.xml @@ -3,7 +3,7 @@ snappymail SnappyMail SnappyMail Webmail - 2.19.1 + 2.19.2 agpl SnappyMail, RainLoop Team, Nextgen-Networks, Tab Fitts, Nathan Kinkade, Pierre-Alain Bandinelli sQuery = ''; } - public function Logger() : \MailSo\Log\Logger + private function Logger() : \MailSo\Log\Logger { return $this->oActions->Logger(); } - public function Plugins() : Plugins\Manager + private function Plugins() : Plugins\Manager { return $this->oActions->Plugins(); } - public function Config() : Config\Application + private function Config() : Config\Application { return $this->oActions->Config(); } - public function Cacher() : \MailSo\Cache\CacheClient + private function Cacher() : \MailSo\Cache\CacheClient { return $this->oActions->Cacher(); } - public function StorageProvider() : Providers\Storage + private function StorageProvider() : Providers\Storage { return $this->oActions->StorageProvider(); } - public function SettingsProvider() : Providers\Settings + private function SettingsProvider() : Providers\Settings { return $this->oActions->SettingsProvider(); }