public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[SOGo][Web] Enable SOGo URL Encryption
260906e3
data/Dockerfiles/sogo/bootstrap-sogo.sh | 4 ++++
data/web/inc/triggers.user.inc.php | 4 ++--
data/web/sogo-auth.php | 5 +----
docker-compose.yml | 2 +-
4 files changed, 8 insertions(+), 7 deletions(-)
Diff
diff --git a/data/Dockerfiles/sogo/bootstrap-sogo.sh b/data/Dockerfiles/sogo/bootstrap-sogo.sh
index 96d8a691..ad667fca 100755
--- a/data/Dockerfiles/sogo/bootstrap-sogo.sh
+++ b/data/Dockerfiles/sogo/bootstrap-sogo.sh
@@ -50,6 +50,10 @@ cat <<EOF > /var/lib/sogo/GNUstep/Defaults/sogod.plist
<string>YES</string>
<key>SOGoEncryptionKey</key>
<string>${RAND_PASS}</string>
+ <key>SOGoURLEncryptionEnabled</key>
+ <string>YES</string>
+ <key>SOGoURLEncryptionPassphrase</key>
+ <string>${RAND_PASS}</string>
<key>OCSAdminURL</key>
<string>mysql://${DBUSER}:${DBPASS}@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/${DBNAME}/sogo_admin</string>
<key>OCSCacheFolderURL</key>
diff --git a/data/web/inc/triggers.user.inc.php b/data/web/inc/triggers.user.inc.php
index 4dee75a3..36176c69 100644
--- a/data/web/inc/triggers.user.inc.php
+++ b/data/web/inc/triggers.user.inc.php
@@ -80,7 +80,7 @@ if (isset($_POST["verify_tfa_login"])) {
intval($user_details['attributes']['force_pw_update']) != 1 &&
getenv('SKIP_SOGO') != "y" &&
!$is_dual) {
- header("Location: /SOGo/so/{$_SESSION['mailcow_cc_username']}");
+ header("Location: /SOGo/so/");
die();
} else {
header("Location: /user");
@@ -146,7 +146,7 @@ if (isset($_POST["login_user"]) && isset($_POST["pass_user"])) {
intval($user_details['attributes']['force_pw_update']) != 1 &&
getenv('SKIP_SOGO') != "y" &&
!$is_dual) {
- header("Location: /SOGo/so/{$login_user}");
+ header("Location: /SOGo/so/");
die();
} else {
header("Location: /user");
diff --git a/data/web/sogo-auth.php b/data/web/sogo-auth.php
index 00709fe5..962627ba 100644
--- a/data/web/sogo-auth.php
+++ b/data/web/sogo-auth.php
@@ -64,7 +64,7 @@ elseif (isset($_GET['login'])) {
':remote_addr' => ($_SERVER['HTTP_X_REAL_IP'] ?? $_SERVER['REMOTE_ADDR'])
));
// redirect to sogo (sogo will get the correct credentials via nginx auth_request
- header("Location: /SOGo/so/{$login}");
+ header("Location: /SOGo/so/");
exit;
}
}
@@ -81,10 +81,7 @@ elseif (isset($_SERVER['HTTP_X_ORIGINAL_URI']) && strcasecmp(substr($_SERVER['HT
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/sessions.inc.php';
- // extract email address from "/SOGo/so/user@domain/xy"
- $url_parts = explode("/", $_SERVER['HTTP_X_ORIGINAL_URI']);
$email_list = array(
- $url_parts[3], // Requested mailbox
($_SESSION['mailcow_cc_username'] ?? ''), // Current user
($_SESSION["dual-login"]["username"] ?? ''), // Dual login user
);
diff --git a/docker-compose.yml b/docker-compose.yml
index 215a196f..eab49fd6 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -200,7 +200,7 @@ services:
- phpfpm
sogo-mailcow:
- image: ghcr.io/mailcow/sogo:1.135
+ image: ghcr.io/mailcow/sogo:1.136
environment:
- DBNAME=${DBNAME}
- DBUSER=${DBUSER}