diff --git a/.docker/release/files/usr/local/include/application.ini b/.docker/release/files/usr/local/include/application.ini index bc92ee085..6a68e6e4b 100644 --- a/.docker/release/files/usr/local/include/application.ini +++ b/.docker/release/files/usr/local/include/application.ini @@ -298,5 +298,5 @@ dev_email = "" dev_password = "" [version] -current = "2.18.5" +current = "2.18.6" saved = "Fri, 30 Sep 2022 12:34:56 +0000" diff --git a/build/plugins.php b/build/plugins.php index 5c34bb38f..3e6129589 100755 --- a/build/plugins.php +++ b/build/plugins.php @@ -28,7 +28,7 @@ $keys = [ 'version' ]; foreach (glob(ROOT_DIR . '/plugins/*', GLOB_NOSORT | GLOB_ONLYDIR) as $dir) { - if (is_file("{$dir}/index.php")) { + if (is_file("{$dir}/index.php") && !strpos($dir, '.bak')) { require "{$dir}/index.php"; $name = basename($dir); $class = new ReflectionClass(str_replace('-', '', $name) . 'Plugin'); @@ -50,7 +50,7 @@ foreach (glob(ROOT_DIR . '/plugins/*', GLOB_NOSORT | GLOB_ONLYDIR) as $dir) { @unlink($tgz_destination); @unlink("{$tar_destination}.gz"); $tar = new PharData($tar_destination); - $tar->buildFromDirectory('./plugins/', '/' . \preg_quote("./plugins/{$name}/", '/') . '/'); + $tar->buildFromDirectory('./plugins/', '/' . \preg_quote("./plugins/{$name}/", '/') . '((?!\.bak).)*$/'); $tar->compress(Phar::GZ); unlink($tar_destination); rename("{$tar_destination}.gz", $tgz_destination); @@ -58,7 +58,7 @@ foreach (glob(ROOT_DIR . '/plugins/*', GLOB_NOSORT | GLOB_ONLYDIR) as $dir) { $phar_destination = PLUGINS_DEST_DIR . "/{$name}.phar"; @unlink($phar_destination); $tar = new Phar($phar_destination); - $tar->buildFromDirectory("./plugins/{$name}/"); + $tar->buildFromDirectory("./plugins/{$name}/", '/^((?!\.bak).)*$/'); $tar->compress(Phar::GZ); unlink($phar_destination); rename("{$phar_destination}.gz", $phar_destination); @@ -86,4 +86,3 @@ $manifest = str_replace('}]', "}\n]", $manifest); $manifest = str_replace('","', "\",\n\t\t\"", $manifest); $manifest = str_replace('\/', '/', $manifest); file_put_contents(PLUGINS_DEST_DIR . "/packages.json", $manifest); -exit; diff --git a/dev/Stores/User/Settings.js b/dev/Stores/User/Settings.js index 1d10407b3..6869783f7 100644 --- a/dev/Stores/User/Settings.js +++ b/dev/Stores/User/Settings.js @@ -4,7 +4,7 @@ import { koComputable } from 'External/ko'; import { Layout } from 'Common/EnumsUser'; import { pInt } from 'Common/Utils'; import { addObservablesTo } from 'External/ko'; -import { $htmlCL, SettingsGet, fireEvent } from 'Common/Globals'; +import { $htmlCL, SettingsGet, SettingsCapa, fireEvent } from 'Common/Globals'; import { ThemeStore } from 'Stores/Theme'; export const SettingsUserStore = new class { @@ -57,7 +57,7 @@ export const SettingsUserStore = new class { let iAutoLogoutTimer; self.delayLogout = (() => { clearTimeout(iAutoLogoutTimer); - if (0 < self.autoLogout() && !SettingsGet('AccountSignMe')) { + if (0 < self.autoLogout() && !SettingsGet('AccountSignMe') && SettingsCapa('AutoLogout')) { iAutoLogoutTimer = setTimeout( rl.app.logout, self.autoLogout() * 60000 diff --git a/dev/Styles/User/MessageView.less b/dev/Styles/User/MessageView.less index cc4db40d6..013211c5b 100644 --- a/dev/Styles/User/MessageView.less +++ b/dev/Styles/User/MessageView.less @@ -345,6 +345,9 @@ html.rl-no-preview-pane { background: #e8e8e8; border-bottom: 1px solid #ddd; } + .attachmentsControls > * { + margin-right: 0.5em + } .sm-bq-switcher > summary { border: 1px solid #999; diff --git a/dev/View/User/MailBox/MessageView.js b/dev/View/User/MailBox/MessageView.js index bc60e7075..84ec31530 100644 --- a/dev/View/User/MailBox/MessageView.js +++ b/dev/View/User/MailBox/MessageView.js @@ -460,7 +460,7 @@ export class MailMessageView extends AbstractViewRight { } downloadAsZip() { - const hashes = (currentMessage() ? currentMessage().attachments : []) + const hashes = (currentMessage()?.attachments || []) .map(item => item?.checked() /*&& !item?.isLinked()*/ ? item.download : '') .filter(v => v); if (hashes.length) { diff --git a/integrations/cloudron/DESCRIPTION.md b/integrations/cloudron/DESCRIPTION.md index a6e41fc49..de1125c82 100644 --- a/integrations/cloudron/DESCRIPTION.md +++ b/integrations/cloudron/DESCRIPTION.md @@ -1,4 +1,4 @@ -This app packages SnappyMail 2.18.5. +This app packages SnappyMail 2.18.6. SnappyMail is a simple, modern, lightweight & fast web-based email client. diff --git a/integrations/cloudron/Dockerfile b/integrations/cloudron/Dockerfile index 0c2e98a4c..1fcde6d61 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.5 +VERSION=2.18.6 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 0e7a0b458..4fc19f1dc 100644 --- a/integrations/nextcloud/snappymail/appinfo/info.xml +++ b/integrations/nextcloud/snappymail/appinfo/info.xml @@ -3,7 +3,7 @@ snappymail SnappyMail SnappyMail Webmail - 2.18.5 + 2.18.6 agpl SnappyMail, RainLoop Team, Nextgen-Networks, Tab Fitts, Nathan Kinkade, Pierre-Alain Bandinelli Simple, modern and fast web-based email client. After enabling in Nextcloud, go to Nextcloud admin panel, "Additionnal settings" and you will see a "SnappyMail webmail" section. There, click on the link to go to the SnappyMail admin panel. diff --git a/integrations/virtualmin/snappymail.pl b/integrations/virtualmin/snappymail.pl index 2b7c65425..ab99e1e86 100644 --- a/integrations/virtualmin/snappymail.pl +++ b/integrations/virtualmin/snappymail.pl @@ -20,7 +20,7 @@ return "SnappyMail Webmail is a browser-based multilingual IMAP client with an a # script_snappymail_versions() sub script_snappymail_versions { -return ( "2.18.5" ); +return ( "2.18.6" ); } sub script_snappymail_version_desc diff --git a/package.json b/package.json index 2ffc1cc44..f49d6940f 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "title": "SnappyMail", "description": "Simple, modern & fast web-based email client", "private": true, - "version": "2.18.5", + "version": "2.18.6", "homepage": "https://snappymail.eu", "author": { "name": "DJ Maze", diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/ServiceActions.php b/snappymail/v/0.0.0/app/libraries/RainLoop/ServiceActions.php index 883ebf1ef..5184930b9 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/ServiceActions.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/ServiceActions.php @@ -109,7 +109,7 @@ class ServiceActions { throw new Exceptions\ClientException(Notifications::InvalidToken, null, 'CSRF failed'); } - else if (!empty($sAction)) + if (!empty($sAction)) { if ($this->oActions instanceof ActionsAdmin && 0 === \stripos($sAction, 'Admin') && !\in_array($sAction, ['AdminLogin', 'AdminLogout'])) { $this->oActions->IsAdminLoggined(); diff --git a/vendors/openpgp-5/dist/openpgp.js b/vendors/openpgp-5/dist/openpgp.js index 2c59e4e4e..c7858bd32 100644 --- a/vendors/openpgp-5/dist/openpgp.js +++ b/vendors/openpgp-5/dist/openpgp.js @@ -1883,12 +1883,12 @@ var openpgp = (function (exports) { }, /** - * Remove trailing spaces and tabs from each line + * Remove trailing spaces, carriage returns and tabs from each line */ removeTrailingSpaces(text) { return text.split('\n').map(line => { let i = line.length - 1; - for (; i >= 0 && (line[i] === ' ' || line[i] === '\t'); i--); + for (; i >= 0 && (line[i] === ' ' || line[i] === '\t' || line[i] === '\r'); i--); return line.substr(0, i + 1); }).join('\n'); },