aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesús Daniel Colmenares Oviedo <DtxdF@disroot.org>2024-03-08 05:16:19 +0000
committerYasuhiro Kimura <yasu@FreeBSD.org>2024-03-08 06:51:21 +0000
commit396010cb585aaaf9e3f87038f06760dece7e1fd7 (patch)
treeaf0b5428fbe5f6b4e3b3ce9de8f9b47ff580ee96
parent44b591df85b45b63a612c55de7cc1677fa9b484f (diff)
downloadports-396010cb585aaaf9e3f87038f06760dece7e1fd7.tar.gz
ports-396010cb585aaaf9e3f87038f06760dece7e1fd7.zip
mail/snappymail: Fix error while accessing admin page
On a fresh installation, the admin page returns a 500 error, indicating a web server error. The logs reveal what the problem is, which is already fixed in upstream [1], but until a new version of snappymail is released, the user will see the following error: ``` RainLoop\Config\Application::SetPassword(): Argument #1 ($oPassword) must be of type SnappyMail\SensitiveString, string given, called in /usr/local/www/snappymail/snapp ymail/v/2.35.2/app/libraries/RainLoop/Actions.php on line 672 ``` Reference: https://github.com/the-djmaze/snappymail/issues/1472 [1] PR: 277571 MFH: 2024Q1
-rw-r--r--mail/snappymail/Makefile2
-rw-r--r--mail/snappymail/files/patch-snappymail_v_2.35.2_app_libraries_RainLoop_Actions.php11
2 files changed, 12 insertions, 1 deletions
diff --git a/mail/snappymail/Makefile b/mail/snappymail/Makefile
index 65ecf3ed20e7..c202afa3fb46 100644
--- a/mail/snappymail/Makefile
+++ b/mail/snappymail/Makefile
@@ -1,6 +1,6 @@
PORTNAME= snappymail
DISTVERSION= 2.35.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= mail www
MASTER_SITES= https://github.com/the-djmaze/snappymail/releases/download/v${DISTVERSION}/
PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX}
diff --git a/mail/snappymail/files/patch-snappymail_v_2.35.2_app_libraries_RainLoop_Actions.php b/mail/snappymail/files/patch-snappymail_v_2.35.2_app_libraries_RainLoop_Actions.php
new file mode 100644
index 000000000000..861cd117553e
--- /dev/null
+++ b/mail/snappymail/files/patch-snappymail_v_2.35.2_app_libraries_RainLoop_Actions.php
@@ -0,0 +1,11 @@
+--- snappymail/v/2.35.2/app/libraries/RainLoop/Actions.php.orig 2024-03-08 05:14:45 UTC
++++ snappymail/v/2.35.2/app/libraries/RainLoop/Actions.php
+@@ -668,7 +668,7 @@ class Actions
+ $sPassword = \substr(\base64_encode(\random_bytes(16)), 0, 12);
+ Utils::saveFile($passfile, $sPassword . "\n");
+ // \chmod($passfile, 0600);
+- $oConfig->SetPassword($sPassword);
++ $oConfig->SetPassword(new \SnappyMail\SensitiveString($sPassword));
+ $oConfig->Save();
+ }
+ }