| @@ 47-54 (lines=8) @@ | ||
| 44 | header('Location: http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); |
|
| 45 | } |
|
| 46 | $opt['page']['force_https_login'] = false; |
|
| 47 | } else { |
|
| 48 | if ($opt['page']['https']['mode'] == HTTPS_ENFORCED) { |
|
| 49 | if (!$opt['page']['https']['active']) { |
|
| 50 | header('Location: https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); |
|
| 51 | } |
|
| 52 | $opt['page']['force_https_login'] = true; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | } |
|
| 56 | ||
| 57 | // load domain specific settings |
|
| @@ 51-56 (lines=6) @@ | ||
| 48 | $tpl->redirect('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); |
|
| 49 | } |
|
| 50 | $opt['page']['force_https_login'] = false; |
|
| 51 | } elseif ($opt['page']['https']['mode'] == HTTPS_ENFORCED) { |
|
| 52 | if (!$opt['page']['https']['active']) { |
|
| 53 | $tpl->redirect('https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); |
|
| 54 | } |
|
| 55 | $opt['page']['force_https_login'] = true; |
|
| 56 | } elseif (!empty($_COOKIE[$opt['session']['cookiename'] . 'https_session']) && !$opt['page']['https']['active']) { |
|
| 57 | // during login was https active -> session data is https only -> redirect to https |
|
| 58 | $tpl->redirect('https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); |
|
| 59 | } |
|