NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
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

Trace

data/web/sogo-auth.php

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

sogo-auth.php on main
Author Date Commit Line Code
Marcel Hofer over 7 years ago cac67db

add config ALLOW_ADMIN_EMAIL_LOGIN and implement password-less SOGo login admins

Full commit hash
cac67db20314e6a023ef4b8a059d82765bb3023e
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
1
<?php
Open commit View diff
1 <?php
same change cac67db

add config ALLOW_ADMIN_EMAIL_LOGIN and implement password-less SOGo login admins

Full commit hash
cac67db20314e6a023ef4b8a059d82765bb3023e
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
2
Open commit View diff
2
andryyy about 5 years ago 78270f9

[Web] Do not allow admin login to mailbox logged in as user while ALLOW_ADMIN_EMAIL_LOGIN is n

Full commit hash
78270f9707713a91a17583304c4b06626e7f5720
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
3
$ALLOW_ADMIN_EMAIL_LOGIN = (preg_match(
Open commit View diff
3 $ALLOW_ADMIN_EMAIL_LOGIN = (preg_match(
same change 78270f9

[Web] Do not allow admin login to mailbox logged in as user while ALLOW_ADMIN_EMAIL_LOGIN is n

Full commit hash
78270f9707713a91a17583304c4b06626e7f5720
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
4
  "/^([yY][eE][sS]|[yY])+$/",
Open commit View diff
4 "/^([yY][eE][sS]|[yY])+$/",
same change 78270f9

[Web] Do not allow admin login to mailbox logged in as user while ALLOW_ADMIN_EMAIL_LOGIN is n

Full commit hash
78270f9707713a91a17583304c4b06626e7f5720
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
5
  $_ENV["ALLOW_ADMIN_EMAIL_LOGIN"]
Open commit View diff
5 $_ENV["ALLOW_ADMIN_EMAIL_LOGIN"]
same change 78270f9

[Web] Do not allow admin login to mailbox logged in as user while ALLOW_ADMIN_EMAIL_LOGIN is n

Full commit hash
78270f9707713a91a17583304c4b06626e7f5720
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
6
));
Open commit View diff
6 ));
same change 78270f9

[Web] Do not allow admin login to mailbox logged in as user while ALLOW_ADMIN_EMAIL_LOGIN is n

Full commit hash
78270f9707713a91a17583304c4b06626e7f5720
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
7
Open commit View diff
7
Marcel Hofer over 7 years ago 6a7b438

allow multiple concurrent admin logins

Full commit hash
6a7b4387ebd54180decc3e3ea6b2c0c9bf44fc09
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
8
$session_var_user_allowed = 'sogo-sso-user-allowed';
Open commit View diff
8 $session_var_user_allowed = 'sogo-sso-user-allowed';
Marcel Hofer over 7 years ago dd6d253

add random masterpass for sogo admin login

Full commit hash
dd6d253ac07e40bc8e4b6e9f5f53ef208c0b18cb
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
9
$session_var_pass = 'sogo-sso-pass';
Open commit View diff
9 $session_var_pass = 'sogo-sso-pass';
Marcel Hofer over 7 years ago cac67db

add config ALLOW_ADMIN_EMAIL_LOGIN and implement password-less SOGo login admins

Full commit hash
cac67db20314e6a023ef4b8a059d82765bb3023e
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
10
Open commit View diff
10
Marcel Hofer over 7 years ago a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
11
// validate credentials for basic auth requests
Open commit View diff
11 // validate credentials for basic auth requests
andryyy about 5 years ago b2272b8

[Dovecot] Re-add listescape...

Full commit hash
b2272b8e35e93a1fd8f26e57bed944b89867bc2a
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
12
if (isset($_SERVER['PHP_AUTH_USER'])) {
Open commit View diff
12 if (isset($_SERVER['PHP_AUTH_USER'])) {
Marcel Hofer over 7 years ago a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
13
  // load prerequisites only when required
Open commit View diff
13 // load prerequisites only when required
Mirko Ceroni almost 3 years ago 389eb99

Update sogo-auth.php

Full commit hash
389eb99c10b37a730716fa0e60cdfaa27c7588b3
Author
Mirko Ceroni <[email protected]>
Date
almost 3 years ago
Selected line
14
  require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
Open commit View diff
14 require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
FreddleSpl0it 6 months ago 56ea430

[Web] Allow admins to limit EAS and DAV access for mailbox users

Full commit hash
56ea4302ed13ac9aa344dc840689c4dd6ac76b68
Author
FreddleSpl0it <[email protected]>
Date
6 months ago
Selected line
15
Open commit View diff
15
Marcel Hofer over 7 years ago a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
16
  $username = $_SERVER['PHP_AUTH_USER'];
Open commit View diff
16 $username = $_SERVER['PHP_AUTH_USER'];
same change a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
17
  $password = $_SERVER['PHP_AUTH_PW'];
Open commit View diff
17 $password = $_SERVER['PHP_AUTH_PW'];
FreddleSpl0it 6 months ago 56ea430

[Web] Allow admins to limit EAS and DAV access for mailbox users

Full commit hash
56ea4302ed13ac9aa344dc840689c4dd6ac76b68
Author
FreddleSpl0it <[email protected]>
Date
6 months ago
Selected line
18
Open commit View diff
18
same change 56ea430

[Web] Allow admins to limit EAS and DAV access for mailbox users

Full commit hash
56ea4302ed13ac9aa344dc840689c4dd6ac76b68
Author
FreddleSpl0it <[email protected]>
Date
6 months ago
Selected line
19
  // Determine service type for protocol access check
Open commit View diff
19 // Determine service type for protocol access check
same change 56ea430

[Web] Allow admins to limit EAS and DAV access for mailbox users

Full commit hash
56ea4302ed13ac9aa344dc840689c4dd6ac76b68
Author
FreddleSpl0it <[email protected]>
Date
6 months ago
Selected line
20
  $service = 'NONE';
Open commit View diff
20 $service = 'NONE';
andryyy over 4 years ago e13bc24

[Web, Dovecot] Allow to define scope of services for app passwords

Full commit hash
e13bc242a4130c1333f995c1bf02369c06e3a16d
Author
andryyy <[email protected]>
Date
over 4 years ago
Selected line
21
  $original_uri = isset($_SERVER['HTTP_X_ORIGINAL_URI']) ? $_SERVER['HTTP_X_ORIGINAL_URI'] : '';
Open commit View diff
21 $original_uri = isset($_SERVER['HTTP_X_ORIGINAL_URI']) ? $_SERVER['HTTP_X_ORIGINAL_URI'] : '';
same change e13bc24

[Web, Dovecot] Allow to define scope of services for app passwords

Full commit hash
e13bc242a4130c1333f995c1bf02369c06e3a16d
Author
andryyy <[email protected]>
Date
over 4 years ago
Selected line
22
  if (preg_match('/^(\/SOGo|)\/dav.*/', $original_uri) === 1) {
Open commit View diff
22 if (preg_match('/^(\/SOGo|)\/dav.*/', $original_uri) === 1) {
FreddleSpl0it 6 months ago 56ea430

[Web] Allow admins to limit EAS and DAV access for mailbox users

Full commit hash
56ea4302ed13ac9aa344dc840689c4dd6ac76b68
Author
FreddleSpl0it <[email protected]>
Date
6 months ago
Selected line
23
    $service = 'DAV';
Open commit View diff
23 $service = 'DAV';
andryyy over 4 years ago e13bc24

[Web, Dovecot] Allow to define scope of services for app passwords

Full commit hash
e13bc242a4130c1333f995c1bf02369c06e3a16d
Author
andryyy <[email protected]>
Date
over 4 years ago
Selected line
24
  }
Open commit View diff
24 }
same change e13bc24

[Web, Dovecot] Allow to define scope of services for app passwords

Full commit hash
e13bc242a4130c1333f995c1bf02369c06e3a16d
Author
andryyy <[email protected]>
Date
over 4 years ago
Selected line
25
  elseif (preg_match('/^(\/SOGo|)\/Microsoft-Server-ActiveSync.*/', $original_uri) === 1) {
Open commit View diff
25 elseif (preg_match('/^(\/SOGo|)\/Microsoft-Server-ActiveSync.*/', $original_uri) === 1) {
FreddleSpl0it 6 months ago 56ea430

[Web] Allow admins to limit EAS and DAV access for mailbox users

Full commit hash
56ea4302ed13ac9aa344dc840689c4dd6ac76b68
Author
FreddleSpl0it <[email protected]>
Date
6 months ago
Selected line
26
    $service = 'EAS';
Open commit View diff
26 $service = 'EAS';
andryyy over 4 years ago e13bc24

[Web, Dovecot] Allow to define scope of services for app passwords

Full commit hash
e13bc242a4130c1333f995c1bf02369c06e3a16d
Author
andryyy <[email protected]>
Date
over 4 years ago
Selected line
27
  }
Open commit View diff
27 }
FreddleSpl0it 6 months ago 56ea430

[Web] Allow admins to limit EAS and DAV access for mailbox users

Full commit hash
56ea4302ed13ac9aa344dc840689c4dd6ac76b68
Author
FreddleSpl0it <[email protected]>
Date
6 months ago
Selected line
28
Open commit View diff
28
same change 56ea430

[Web] Allow admins to limit EAS and DAV access for mailbox users

Full commit hash
56ea4302ed13ac9aa344dc840689c4dd6ac76b68
Author
FreddleSpl0it <[email protected]>
Date
6 months ago
Selected line
29
  $login_check = check_login($username, $password, array('service' => $service));
Open commit View diff
29 $login_check = check_login($username, $password, array('service' => $service));
Marcel Hofer over 7 years ago a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
30
  if ($login_check === 'user') {
Open commit View diff
30 if ($login_check === 'user') {
same change a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
31
    header("X-User: $username");
Open commit View diff
31 header("X-User: $username");
same change a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
32
    header("X-Auth: Basic ".base64_encode("$username:$password"));
Open commit View diff
32 header("X-Auth: Basic ".base64_encode("$username:$password"));
same change a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
33
    header("X-Auth-Type: Basic");
Open commit View diff
33 header("X-Auth-Type: Basic");
same change a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
34
    exit;
Open commit View diff
34 exit;
same change a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
35
  } else {
Open commit View diff
35 } else {
same change a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
36
    header('HTTP/1.0 401 Unauthorized');
Open commit View diff
36 header('HTTP/1.0 401 Unauthorized');
same change a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
37
    echo 'Invalid login';
Open commit View diff
37 echo 'Invalid login';
same change a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
38
    exit;
Open commit View diff
38 exit;
same change a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
39
  }
Open commit View diff
39 }
same change a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
40
}
Open commit View diff
40 }
same change a110378

always check basic auth against user database for EAS and SOGo if ALLOW_ADMIN_EMAIL_LOGIN is enabled

Full commit hash
a110378000168848f97947a5d88f7ed9db7373be
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
41
// check permissions and redirect for direct GET ?login=xy requests
Open commit View diff
41 // check permissions and redirect for direct GET ?login=xy requests
André Peters over 7 years ago 88fbc6b

Update sogo-auth.php

Full commit hash
88fbc6bf1675957ce40642fe62e56f4d2ce20529
Author
AndrĂ© Peters <[email protected]>
Date
over 7 years ago
Selected line
42
elseif (isset($_GET['login'])) {
Open commit View diff
42 elseif (isset($_GET['login'])) {
Marcel Hofer over 7 years ago e2f39df

remove obsolete code, use openssl instead of `cat /dev/urandom`

Full commit hash
e2f39df7d84c96885e807c2216b8b062dcc75ebe
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
43
  // load prerequisites only when required
Open commit View diff
43 // load prerequisites only when required
André Peters over 7 years ago 4482aee

Update sogo-auth.php

Full commit hash
4482aee747934f062b4c3825f7b3c24083489396
Author
AndrĂ© Peters <[email protected]>
Date
over 7 years ago
Selected line
44
  require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
Open commit View diff
44 require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
andryyy about 5 years ago b2272b8

[Dovecot] Re-add listescape...

Full commit hash
b2272b8e35e93a1fd8f26e57bed944b89867bc2a
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
45
  // check if dual_login is active
Open commit View diff
45 // check if dual_login is active
same change b2272b8

[Dovecot] Re-add listescape...

Full commit hash
b2272b8e35e93a1fd8f26e57bed944b89867bc2a
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
46
  $is_dual = (!empty($_SESSION["dual-login"]["username"])) ? true : false;
Open commit View diff
46 $is_dual = (!empty($_SESSION["dual-login"]["username"])) ? true : false;
same change b2272b8

[Dovecot] Re-add listescape...

Full commit hash
b2272b8e35e93a1fd8f26e57bed944b89867bc2a
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
47
  // check permissions (if dual_login is active, deny sso when acl is not given)
Open commit View diff
47 // check permissions (if dual_login is active, deny sso when acl is not given)
same change b2272b8

[Dovecot] Re-add listescape...

Full commit hash
b2272b8e35e93a1fd8f26e57bed944b89867bc2a
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
48
  $login = html_entity_decode(rawurldecode($_GET["login"]));
Open commit View diff
48 $login = html_entity_decode(rawurldecode($_GET["login"]));
same change b2272b8

[Dovecot] Re-add listescape...

Full commit hash
b2272b8e35e93a1fd8f26e57bed944b89867bc2a
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
49
  if (isset($_SESSION['mailcow_cc_role']) &&
Open commit View diff
49 if (isset($_SESSION['mailcow_cc_role']) &&
andryyy over 4 years ago 8116bf5

[Web] Fix sogo-auth, fixes #4297

Full commit hash
8116bf5ea39c7ced42689d6be1857cb7a1809f10
Author
andryyy <[email protected]>
Date
over 4 years ago
Selected line
50
    (($_SESSION['acl']['login_as'] == "1" && $ALLOW_ADMIN_EMAIL_LOGIN !== 0) || ($is_dual === false && $login == $_SESSION['mailcow_cc_username']))) {
Open commit View diff
50 (($_SESSION['acl']['login_as'] == "1" && $ALLOW_ADMIN_EMAIL_LOGIN !== 0) || ($is_dual === false && $login == $_SESSION['mailcow_cc_username']))) {
André Peters over 7 years ago 88fbc6b

Update sogo-auth.php

Full commit hash
88fbc6bf1675957ce40642fe62e56f4d2ce20529
Author
AndrĂ© Peters <[email protected]>
Date
over 7 years ago
Selected line
51
    if (filter_var($login, FILTER_VALIDATE_EMAIL)) {
Open commit View diff
51 if (filter_var($login, FILTER_VALIDATE_EMAIL)) {
andryyy about 5 years ago b2272b8

[Dovecot] Re-add listescape...

Full commit hash
b2272b8e35e93a1fd8f26e57bed944b89867bc2a
Author
andryyy <[email protected]>
Date
about 5 years ago
Selected line
52
      if (user_get_alias_details($login) !== false) {
Open commit View diff
52 if (user_get_alias_details($login) !== false) {
FreddleSpl0it 5 months ago ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
53
        // Block SOGo access if pending actions (2FA setup, password update)
Open commit View diff
53 // Block SOGo access if pending actions (2FA setup, password update)
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
54
        if (!empty($_SESSION['pending_tfa_setup']) || !empty($_SESSION['pending_pw_update'])) {
Open commit View diff
54 if (!empty($_SESSION['pending_tfa_setup']) || !empty($_SESSION['pending_pw_update'])) {
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
55
          header("Location: /");
Open commit View diff
55 header("Location: /");
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
56
          exit;
Open commit View diff
56 exit;
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
57
        }
Open commit View diff
57 }
FreddleSpl0it almost 2 years ago 0b9b8c9

[Web] Ensure correct SOGo SSO password is used after Dovecot restart

Full commit hash
0b9b8c906061857addaed0f10603b3ffc49f9c14
Author
FreddleSpl0it <[email protected]>
Date
almost 2 years ago
Selected line
58
        // register username in session
Open commit View diff
58 // register username in session
Marcel Hofer over 7 years ago 6a7b438

allow multiple concurrent admin logins

Full commit hash
6a7b4387ebd54180decc3e3ea6b2c0c9bf44fc09
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
59
        $_SESSION[$session_var_user_allowed][] = $login;
Open commit View diff
59 $_SESSION[$session_var_user_allowed][] = $login;
FreddleSpl0it over 2 years ago a06c783

[Web] add ldap idp

Full commit hash
a06c78362a29eba6c5ecf1e4a2a6a65362301e1f
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
60
        // set dual login
Open commit View diff
60 // set dual login
FreddleSpl0it almost 2 years ago 0b9b8c9

[Web] Ensure correct SOGo SSO password is used after Dovecot restart

Full commit hash
0b9b8c906061857addaed0f10603b3ffc49f9c14
Author
FreddleSpl0it <[email protected]>
Date
almost 2 years ago
Selected line
61
        if ($_SESSION['acl']['login_as'] == "1" && $ALLOW_ADMIN_EMAIL_LOGIN !== 0 && $is_dual === false && $_SESSION['mailcow_cc_role'] != "user"){
Open commit View diff
61 if ($_SESSION['acl']['login_as'] == "1" && $ALLOW_ADMIN_EMAIL_LOGIN !== 0 && $is_dual === false && $_SESSION['mailcow_cc_role'] != "user"){
FreddleSpl0it over 2 years ago a06c783

[Web] add ldap idp

Full commit hash
a06c78362a29eba6c5ecf1e4a2a6a65362301e1f
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
62
          $_SESSION["dual-login"]["username"] = $_SESSION['mailcow_cc_username'];
Open commit View diff
62 $_SESSION["dual-login"]["username"] = $_SESSION['mailcow_cc_username'];
same change a06c783

[Web] add ldap idp

Full commit hash
a06c78362a29eba6c5ecf1e4a2a6a65362301e1f
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
63
          $_SESSION["dual-login"]["role"]     = $_SESSION['mailcow_cc_role'];
Open commit View diff
63 $_SESSION["dual-login"]["role"] = $_SESSION['mailcow_cc_role'];
same change a06c783

[Web] add ldap idp

Full commit hash
a06c78362a29eba6c5ecf1e4a2a6a65362301e1f
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
64
          $_SESSION['mailcow_cc_username']    = $login;
Open commit View diff
64 $_SESSION['mailcow_cc_username'] = $login;
same change a06c783

[Web] add ldap idp

Full commit hash
a06c78362a29eba6c5ecf1e4a2a6a65362301e1f
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
65
          $_SESSION['mailcow_cc_role']        = "user";
Open commit View diff
65 $_SESSION['mailcow_cc_role'] = "user";
same change a06c783

[Web] add ldap idp

Full commit hash
a06c78362a29eba6c5ecf1e4a2a6a65362301e1f
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
66
        }
Open commit View diff
66 }
andryyy over 4 years ago e13bc24

[Web, Dovecot] Allow to define scope of services for app passwords

Full commit hash
e13bc242a4130c1333f995c1bf02369c06e3a16d
Author
andryyy <[email protected]>
Date
over 4 years ago
Selected line
67
        // update sasl logs
Open commit View diff
67 // update sasl logs
same change e13bc24

[Web, Dovecot] Allow to define scope of services for app passwords

Full commit hash
e13bc242a4130c1333f995c1bf02369c06e3a16d
Author
andryyy <[email protected]>
Date
over 4 years ago
Selected line
68
        $stmt = $pdo->prepare("REPLACE INTO sasl_log (`service`, `app_password`, `username`, `real_rip`) VALUES ('SSO', 0, :username, :remote_addr)");
Open commit View diff
68 $stmt = $pdo->prepare("REPLACE INTO sasl_log (`service`, `app_password`, `username`, `real_rip`) VALUES ('SSO', 0, :username, :remote_addr)");
same change e13bc24

[Web, Dovecot] Allow to define scope of services for app passwords

Full commit hash
e13bc242a4130c1333f995c1bf02369c06e3a16d
Author
andryyy <[email protected]>
Date
over 4 years ago
Selected line
69
        $stmt->execute(array(
Open commit View diff
69 $stmt->execute(array(
same change e13bc24

[Web, Dovecot] Allow to define scope of services for app passwords

Full commit hash
e13bc242a4130c1333f995c1bf02369c06e3a16d
Author
andryyy <[email protected]>
Date
over 4 years ago
Selected line
70
          ':username' => $login,
Open commit View diff
70 ':username' => $login,
andryyy over 4 years ago f0aae22

[Dovecot, Web] Fix remaining issues of app password enhancements from #4296

Full commit hash
f0aae22f77019c906ef1545e7c3343461299f599
Author
andryyy <[email protected]>
Date
over 4 years ago
Selected line
71
          ':remote_addr' => ($_SERVER['HTTP_X_REAL_IP'] ?? $_SERVER['REMOTE_ADDR'])
Open commit View diff
71 ':remote_addr' => ($_SERVER['HTTP_X_REAL_IP'] ?? $_SERVER['REMOTE_ADDR'])
andryyy over 4 years ago e13bc24

[Web, Dovecot] Allow to define scope of services for app passwords

Full commit hash
e13bc242a4130c1333f995c1bf02369c06e3a16d
Author
andryyy <[email protected]>
Date
over 4 years ago
Selected line
72
        ));
Open commit View diff
72 ));
Marcel Hofer over 7 years ago e2f39df

remove obsolete code, use openssl instead of `cat /dev/urandom`

Full commit hash
e2f39df7d84c96885e807c2216b8b062dcc75ebe
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
73
        // redirect to sogo (sogo will get the correct credentials via nginx auth_request
Open commit View diff
73 // redirect to sogo (sogo will get the correct credentials via nginx auth_request
FreddleSpl0it 10 months ago 260906e

[SOGo][Web] Enable SOGo URL Encryption

Full commit hash
260906e3501048bb6909a0d8329926e17cf2377f
Author
FreddleSpl0it <[email protected]>
Date
10 months ago
Selected line
74
        header("Location: /SOGo/so/");
Open commit View diff
74 header("Location: /SOGo/so/");
André Peters over 7 years ago 88fbc6b

Update sogo-auth.php

Full commit hash
88fbc6bf1675957ce40642fe62e56f4d2ce20529
Author
AndrĂ© Peters <[email protected]>
Date
over 7 years ago
Selected line
75
        exit;
Open commit View diff
75 exit;
same change 88fbc6b

Update sogo-auth.php

Full commit hash
88fbc6bf1675957ce40642fe62e56f4d2ce20529
Author
AndrĂ© Peters <[email protected]>
Date
over 7 years ago
Selected line
76
      }
Open commit View diff
76 }
Marcel Hofer over 7 years ago cac67db

add config ALLOW_ADMIN_EMAIL_LOGIN and implement password-less SOGo login admins

Full commit hash
cac67db20314e6a023ef4b8a059d82765bb3023e
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
77
    }
Open commit View diff
77 }
André Peters over 7 years ago 88fbc6b

Update sogo-auth.php

Full commit hash
88fbc6bf1675957ce40642fe62e56f4d2ce20529
Author
AndrĂ© Peters <[email protected]>
Date
over 7 years ago
Selected line
78
  }
Open commit View diff
78 }
FreddleSpl0it over 2 years ago 766c270

[SOGo] fix custom html elements and wrong redirection

Full commit hash
766c270b1fa5a634c10391d23830191fa71a2967
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
79
  header("Location: /");
Open commit View diff
79 header("Location: /");
André Peters over 7 years ago 88fbc6b

Update sogo-auth.php

Full commit hash
88fbc6bf1675957ce40642fe62e56f4d2ce20529
Author
AndrĂ© Peters <[email protected]>
Date
over 7 years ago
Selected line
80
  exit;
Open commit View diff
80 exit;
same change 88fbc6b

Update sogo-auth.php

Full commit hash
88fbc6bf1675957ce40642fe62e56f4d2ce20529
Author
AndrĂ© Peters <[email protected]>
Date
over 7 years ago
Selected line
81
}
Open commit View diff
81 }
Marcel Hofer over 7 years ago 6a7b438

allow multiple concurrent admin logins

Full commit hash
6a7b4387ebd54180decc3e3ea6b2c0c9bf44fc09
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
82
// only check for admin-login on sogo GUI requests
Open commit View diff
82 // only check for admin-login on sogo GUI requests
andryyy over 4 years ago e13bc24

[Web, Dovecot] Allow to define scope of services for app passwords

Full commit hash
e13bc242a4130c1333f995c1bf02369c06e3a16d
Author
andryyy <[email protected]>
Date
over 4 years ago
Selected line
83
elseif (isset($_SERVER['HTTP_X_ORIGINAL_URI']) && strcasecmp(substr($_SERVER['HTTP_X_ORIGINAL_URI'], 0, 9), "/SOGo/so/") === 0) {
Open commit View diff
83 elseif (isset($_SERVER['HTTP_X_ORIGINAL_URI']) && strcasecmp(substr($_SERVER['HTTP_X_ORIGINAL_URI'], 0, 9), "/SOGo/so/") === 0) {
Marcel Hofer over 7 years ago e2f39df

remove obsolete code, use openssl instead of `cat /dev/urandom`

Full commit hash
e2f39df7d84c96885e807c2216b8b062dcc75ebe
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
84
  // this is an nginx auth_request call, we check for existing sogo-sso session variables
Open commit View diff
84 // this is an nginx auth_request call, we check for existing sogo-sso session variables
FreddleSpl0it over 1 year ago aaa7e4a

[Web] Fix incorrect session lifetime in sogo-auth.php

Full commit hash
aaa7e4a184e2126bc0fa76e600cebb984aff29dc
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
85
  require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/vars.inc.php';
Open commit View diff
85 require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/vars.inc.php';
same change aaa7e4a

[Web] Fix incorrect session lifetime in sogo-auth.php

Full commit hash
aaa7e4a184e2126bc0fa76e600cebb984aff29dc
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
86
  if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/inc/vars.local.inc.php')) {
Open commit View diff
86 if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/inc/vars.local.inc.php')) {
same change aaa7e4a

[Web] Fix incorrect session lifetime in sogo-auth.php

Full commit hash
aaa7e4a184e2126bc0fa76e600cebb984aff29dc
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
87
    include_once $_SERVER['DOCUMENT_ROOT'] . '/inc/vars.local.inc.php';
Open commit View diff
87 include_once $_SERVER['DOCUMENT_ROOT'] . '/inc/vars.local.inc.php';
same change aaa7e4a

[Web] Fix incorrect session lifetime in sogo-auth.php

Full commit hash
aaa7e4a184e2126bc0fa76e600cebb984aff29dc
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
88
  }
Open commit View diff
88 }
same change aaa7e4a

[Web] Fix incorrect session lifetime in sogo-auth.php

Full commit hash
aaa7e4a184e2126bc0fa76e600cebb984aff29dc
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
89
  require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/sessions.inc.php';
Open commit View diff
89 require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/sessions.inc.php';
same change aaa7e4a

[Web] Fix incorrect session lifetime in sogo-auth.php

Full commit hash
aaa7e4a184e2126bc0fa76e600cebb984aff29dc
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
90
Open commit View diff
90
Niklas Meyer over 4 years ago 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
91
  $email_list = array(
Open commit View diff
91 $email_list = array(
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
92
      ($_SESSION['mailcow_cc_username'] ?? ''),     // Current user
Open commit View diff
92 ($_SESSION['mailcow_cc_username'] ?? ''), // Current user
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
93
      ($_SESSION["dual-login"]["username"] ?? ''),  // Dual login user
Open commit View diff
93 ($_SESSION["dual-login"]["username"] ?? ''), // Dual login user
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
94
  );
Open commit View diff
94 );
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
95
  foreach($email_list as $email) {
Open commit View diff
95 foreach($email_list as $email) {
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
96
    // check if this email is in session allowed list
Open commit View diff
96 // check if this email is in session allowed list
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
97
    if (
Open commit View diff
97 if (
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
98
        !empty($email) &&
Open commit View diff
98 !empty($email) &&
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
99
        filter_var($email, FILTER_VALIDATE_EMAIL) &&
Open commit View diff
99 filter_var($email, FILTER_VALIDATE_EMAIL) &&
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
100
        is_array($_SESSION[$session_var_user_allowed]) &&
Open commit View diff
100 is_array($_SESSION[$session_var_user_allowed]) &&
FreddleSpl0it over 1 year ago cb47fa4

[Web] Fix force password update at next login

Full commit hash
cb47fa406f10ce929543e3e918c11b985a500ab2
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
101
        in_array($email, $_SESSION[$session_var_user_allowed]) &&
Open commit View diff
101 in_array($email, $_SESSION[$session_var_user_allowed]) &&
FreddleSpl0it 5 months ago ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
102
        !$_SESSION['pending_pw_update'] &&
Open commit View diff
102 !$_SESSION['pending_pw_update'] &&
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
103
        !$_SESSION['pending_tfa_setup']
Open commit View diff
103 !$_SESSION['pending_tfa_setup']
Niklas Meyer over 4 years ago 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
104
    ) {
Open commit View diff
104 ) {
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
105
      $username = $email;
Open commit View diff
105 $username = $email;
FreddleSpl0it almost 2 years ago 0b9b8c9

[Web] Ensure correct SOGo SSO password is used after Dovecot restart

Full commit hash
0b9b8c906061857addaed0f10603b3ffc49f9c14
Author
FreddleSpl0it <[email protected]>
Date
almost 2 years ago
Selected line
106
      $password = file_get_contents("/etc/sogo-sso/sogo-sso.pass");
Open commit View diff
106 $password = file_get_contents("/etc/sogo-sso/sogo-sso.pass");
Niklas Meyer over 4 years ago 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
107
      header("X-User: $username");
Open commit View diff
107 header("X-User: $username");
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
108
      header("X-Auth: Basic ".base64_encode("$username:$password"));
Open commit View diff
108 header("X-Auth: Basic ".base64_encode("$username:$password"));
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
109
      header("X-Auth-Type: Basic");
Open commit View diff
109 header("X-Auth-Type: Basic");
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
110
      exit;
Open commit View diff
110 exit;
same change 89fdd19

Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445)

Full commit hash
89fdd1986d922aa7ae87d589859cd3d483beaa23
Author
Niklas Meyer <[email protected]>
Date
over 4 years ago
Selected line
111
    }
Open commit View diff
111 }
André Peters over 7 years ago 88fbc6b

Update sogo-auth.php

Full commit hash
88fbc6bf1675957ce40642fe62e56f4d2ce20529
Author
AndrĂ© Peters <[email protected]>
Date
over 7 years ago
Selected line
112
  }
Open commit View diff
112 }
Marcel Hofer over 7 years ago cac67db

add config ALLOW_ADMIN_EMAIL_LOGIN and implement password-less SOGo login admins

Full commit hash
cac67db20314e6a023ef4b8a059d82765bb3023e
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
113
}
Open commit View diff
113 }
Marcel Hofer over 7 years ago 6a7b438

allow multiple concurrent admin logins

Full commit hash
6a7b4387ebd54180decc3e3ea6b2c0c9bf44fc09
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
114
Open commit View diff
114
same change 6a7b438

allow multiple concurrent admin logins

Full commit hash
6a7b4387ebd54180decc3e3ea6b2c0c9bf44fc09
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
115
// if username is empty, SOGo will use the normal login methods / login form
Open commit View diff
115 // if username is empty, SOGo will use the normal login methods / login form
same change 6a7b438

allow multiple concurrent admin logins

Full commit hash
6a7b4387ebd54180decc3e3ea6b2c0c9bf44fc09
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
116
header("X-User: ");
Open commit View diff
116 header("X-User: ");
same change 6a7b438

allow multiple concurrent admin logins

Full commit hash
6a7b4387ebd54180decc3e3ea6b2c0c9bf44fc09
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
117
header("X-Auth: ");
Open commit View diff
117 header("X-Auth: ");
same change 6a7b438

allow multiple concurrent admin logins

Full commit hash
6a7b4387ebd54180decc3e3ea6b2c0c9bf44fc09
Author
Marcel Hofer <[email protected]>
Date
over 7 years ago
Selected line
118
header("X-Auth-Type: ");
Open commit View diff
118 header("X-Auth-Type: ");