From eeb289ea4460986ea6f4a04898a060d013e0c1f7 Mon Sep 17 00:00:00 2001
From: the-djmaze <>
Date: Mon, 28 Feb 2022 16:13:41 +0100
Subject: [PATCH] v2.3.1
---
.../files/usr/local/include/application.ini | 2 +-
README.md | 18 +++++++++---------
dev/bootstrap.js | 3 +--
integrations/cloudron/DESCRIPTION.md | 2 +-
integrations/cloudron/Dockerfile | 2 +-
integrations/nextcloud/snappymail/VERSION | 2 +-
.../nextcloud/snappymail/appinfo/info.xml | 2 +-
integrations/virtualmin/snappymail.pl | 2 +-
package.json | 2 +-
plugins/demo-account/index.php | 16 +++++++++++-----
10 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/.docker/release/files/usr/local/include/application.ini b/.docker/release/files/usr/local/include/application.ini
index 10ba9b04a..abeb228bf 100644
--- a/.docker/release/files/usr/local/include/application.ini
+++ b/.docker/release/files/usr/local/include/application.ini
@@ -289,5 +289,5 @@ dev_email = ""
dev_password = ""
[version]
-current = "2.13.0"
+current = "2.13.1"
saved = "Mon, 23 Aug 2021 07:55:13 +0000"
diff --git a/README.md b/README.md
index 267f1e85b..ed7dc85a4 100644
--- a/README.md
+++ b/README.md
@@ -141,21 +141,21 @@ RainLoop 1.15 vs SnappyMail
|--------------- |--------: |--------: |
|admin.js |2.158.025 | 84.080 |
|app.js |4.215.733 | 434.705 |
-|boot.js | 672.433 | 2.042 |
+|boot.js | 672.433 | 2.019 |
|libs.js | 647.679 | 200.928 |
|polyfills.js | 325.908 | 0 |
|serviceworker.js | 0 | 285 |
-|TOTAL |8.019.778 | 722.040 |
+|TOTAL |8.019.778 | 722.017 |
|js/min/* |RainLoop |Snappy |RL gzip |SM gzip |RL brotli |SM brotli |
|--------------- |--------: |--------: |------: |------: |--------: |--------: |
|admin.min.js | 255.514 | 41.747 | 73.899 | 13.727 | 60.674 | 12.266 |
|app.min.js | 516.000 | 209.913 |140.430 | 67.140 |110.657 | 57.339 |
-|boot.min.js | 66.456 | 1.271 | 22.553 | 781 | 20.043 | 629 |
+|boot.min.js | 66.456 | 1.250 | 22.553 | 776 | 20.043 | 626 |
|libs.min.js | 574.626 | 96.683 |177.280 | 35.654 |151.855 | 31.874 |
|polyfills.min.js | 32.608 | 0 | 11.315 | 0 | 10.072 | 0 |
-|TOTAL |1.445.204 | 349.614 |425.477 |117.302 |353.301 |102.108 |
-|TOTAL (no admin) |1.189.690 | 307.867 |351.061 |103.575 |292.627 | 89.842 |
+|TOTAL |1.445.204 | 349.593 |425.477 |117.297 |353.301 |102.105 |
+|TOTAL (no admin) |1.189.690 | 307.846 |351.061 |103.570 |292.627 | 89.839 |
For a user its around 69% smaller and faster than traditional RainLoop.
@@ -183,12 +183,12 @@ For a user its around 69% smaller and faster than traditional RainLoop.
|css/* |RainLoop |Snappy |RL gzip |SM gzip |SM brotli |
|------------ |-------: |------: |------: |------: |--------: |
-|app.css | 340.334 | 81.461 | 46.959 | 16.860 | 14.518 |
-|app.min.css | 274.791 | 65.573 | 39.618 | 14.925 | 13.155 |
+|app.css | 340.334 | 81.400 | 46.959 | 16.839 | 14.477 |
+|app.min.css | 274.791 | 65.545 | 39.618 | 14.918 | 13.147 |
|boot.css | | 1.326 | | 664 | 545 |
|boot.min.css | | 1.071 | | 590 | 474 |
-|admin.css | | 30.212 | | 6.840 | 5.929 |
-|admin.min.css | | 24.288 | | 6.195 | 5.451 |
+|admin.css | | 30.151 | | 6.818 | 5.907 |
+|admin.min.css | | 24.260 | | 6.187 | 5.437 |
### PGP
RainLoop uses the old OpenPGP.js v2
diff --git a/dev/bootstrap.js b/dev/bootstrap.js
index 36fa2c05a..da040f796 100644
--- a/dev/bootstrap.js
+++ b/dev/bootstrap.js
@@ -5,8 +5,6 @@ import { root } from 'Common/Links';
export default App => {
- addEventListener('click', ()=>rl.Dropdowns.detectVisibility());
-
rl.app = App;
rl.logoutReload = App.logoutReload;
@@ -25,6 +23,7 @@ export default App => {
rl.Dropdowns.detectVisibility = (() =>
dropdownVisibility(!!rl.Dropdowns.find(item => item.classList.contains('show')))
).debounce(50);
+ addEventListener('click', ()=>rl.Dropdowns.detectVisibility());
rl.route = {
root: () => {
diff --git a/integrations/cloudron/DESCRIPTION.md b/integrations/cloudron/DESCRIPTION.md
index de2e600b8..ec58a4a35 100644
--- a/integrations/cloudron/DESCRIPTION.md
+++ b/integrations/cloudron/DESCRIPTION.md
@@ -1,4 +1,4 @@
-This app packages SnappyMail 2.13.0.
+This app packages SnappyMail 2.13.1.
SnappyMail is a simple, modern, lightweight & fast web-based email client.
diff --git a/integrations/cloudron/Dockerfile b/integrations/cloudron/Dockerfile
index d057fe1ab..59a5566c2 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.13.0
+VERSION=2.13.1
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/VERSION b/integrations/nextcloud/snappymail/VERSION
index a3ebb9f51..53fdb123b 100755
--- a/integrations/nextcloud/snappymail/VERSION
+++ b/integrations/nextcloud/snappymail/VERSION
@@ -1 +1 @@
-2.13.0
\ No newline at end of file
+2.13.1
\ No newline at end of file
diff --git a/integrations/nextcloud/snappymail/appinfo/info.xml b/integrations/nextcloud/snappymail/appinfo/info.xml
index 317ca10d4..18bfb00a8 100644
--- a/integrations/nextcloud/snappymail/appinfo/info.xml
+++ b/integrations/nextcloud/snappymail/appinfo/info.xml
@@ -4,7 +4,7 @@
SnappyMail
SnappyMail Webmail
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. The default user/password is admin/12345. This version is based on SnappyMail 2.6.0 (2021-07).
- 2.13.0
+ 2.13.1
agpl
SnappyMail Team, Nextgen-Networks, Tab Fitts, Nathan Kinkade, Pierre-Alain Bandinelli
SnappyMail
diff --git a/integrations/virtualmin/snappymail.pl b/integrations/virtualmin/snappymail.pl
index 3965722ea..7409d09ba 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.13.0" );
+return ( "2.13.1" );
}
sub script_snappymail_version_desc
diff --git a/package.json b/package.json
index 7b188f067..fc1ddfb93 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.13.0",
+ "version": "2.13.1",
"homepage": "https://snappymail.eu",
"author": {
"name": "DJ Maze",
diff --git a/plugins/demo-account/index.php b/plugins/demo-account/index.php
index 0b9d4d06e..1a08e9ff3 100644
--- a/plugins/demo-account/index.php
+++ b/plugins/demo-account/index.php
@@ -29,7 +29,9 @@ class DemoAccountPlugin extends \RainLoop\Plugins\AbstractPlugin
\RainLoop\Plugins\Property::NewInstance('email')->SetLabel('Demo Email')
->SetDefaultValue('demo@domain.com'),
\RainLoop\Plugins\Property::NewInstance('password')->SetLabel('Demo Password')
- ->SetType(\RainLoop\Enumerations\PluginPropertyType::PASSWORD)
+ ->SetType(\RainLoop\Enumerations\PluginPropertyType::PASSWORD),
+ \RainLoop\Plugins\Property::NewInstance('recipient_delimiter')->SetLabel('recipient_delimiter')
+ ->SetDefaultValue(''),
);
}
@@ -78,19 +80,23 @@ class DemoAccountPlugin extends \RainLoop\Plugins\AbstractPlugin
public function FilterSendMessage($oMessage)
{
if ($oMessage && $this->isDemoAccount()) {
- $sEmail = $this->Config()->Get('plugin', 'email');
+ $recipient_delimiter = $this->Config()->Get('plugin', 'recipient_delimiter');
+ $regex = '/^' . \preg_quote($this->Config()->Get('plugin', 'email')) . '$/D';
+ if ($recipient_delimiter) {
+ $regex = \str_replace('@', '('.\preg_quote($recipient_delimiter).'.+)?@', $regex);
+ }
foreach ($oMessage->GetTo() as $oEmail) {
- if ($oEmail->GetEmail() !== $sEmail) {
+ if (!\preg_match($regex, $oEmail->GetEmail())) {
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::DemoSendMessageError);
}
}
foreach ($oMessage->GetCc() ?: [] as $oEmail) {
- if ($oEmail->GetEmail() !== $sEmail) {
+ if (!\preg_match($regex, $oEmail->GetEmail())) {
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::DemoSendMessageError);
}
}
foreach ($oMessage->GetBcc() ?: [] as $oEmail) {
- if ($oEmail->GetEmail() !== $sEmail) {
+ if (!\preg_match($regex, $oEmail->GetEmail())) {
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::DemoSendMessageError);
}
}