Skip to content

Commit aaa7e4a

Browse files
committed
[Web] Fix incorrect session lifetime in sogo-auth.php
1 parent 3912341 commit aaa7e4a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

data/web/sogo-auth.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,12 @@
7272
// only check for admin-login on sogo GUI requests
7373
elseif (isset($_SERVER['HTTP_X_ORIGINAL_URI']) && strcasecmp(substr($_SERVER['HTTP_X_ORIGINAL_URI'], 0, 9), "/SOGo/so/") === 0) {
7474
// this is an nginx auth_request call, we check for existing sogo-sso session variables
75-
session_start();
75+
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/vars.inc.php';
76+
if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/inc/vars.local.inc.php')) {
77+
include_once $_SERVER['DOCUMENT_ROOT'] . '/inc/vars.local.inc.php';
78+
}
79+
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/sessions.inc.php';
80+
7681
// extract email address from "/SOGo/so/user@domain/xy"
7782
$url_parts = explode("/", $_SERVER['HTTP_X_ORIGINAL_URI']);
7883
$email_list = array(

0 commit comments

Comments
 (0)