Commit f43807f8 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes: #2669 SSL check in password recovery was in the wrong place

Showing with 8 additions and 10 deletions
+8 -10
...@@ -56,7 +56,7 @@ class passwordRecovery { ...@@ -56,7 +56,7 @@ class passwordRecovery {
/* Constructor */ /* Constructor */
function passwordRecovery() function passwordRecovery()
{ {
global $config; global $config, $ssl;
/* Destroy old session if exists. /* Destroy old session if exists.
Else you will get your old session back, if you not logged out correctly. */ Else you will get your old session back, if you not logged out correctly. */
session::destroy(); session::destroy();
...@@ -66,6 +66,13 @@ class passwordRecovery { ...@@ -66,6 +66,13 @@ class passwordRecovery {
reset_errors(); reset_errors();
$config = $this->loadConfig(); $config = $this->loadConfig();
/* If SSL is forced, just forward to the SSL enabled site */
if (($config->get_cfg_value("forcessl") == "TRUE") && ($ssl != '')) {
header ("Location: $ssl");
exit;
}
$this->config = $config; $this->config = $config;
$this->setupSmarty(); $this->setupSmarty();
......
...@@ -22,15 +22,6 @@ require_once("../include/php_setup.inc"); ...@@ -22,15 +22,6 @@ require_once("../include/php_setup.inc");
require_once("functions.inc"); require_once("functions.inc");
require_once("variables.inc"); require_once("variables.inc");
$config = session::global_get('config');
/* If SSL is forced, just forward to the SSL enabled site */
if (($config->get_cfg_value("forcessl") == "TRUE") && ($ssl != '')) {
header ("Location: $ssl");
exit;
}
$pwRecovery = new passwordRecovery(); $pwRecovery = new passwordRecovery();
$pwRecovery->execute(); $pwRecovery->execute();
......
  • bmortier @bmortier

    mentioned in issue #911

    By jlgrall on 2017-09-02T15:03:45 (imported from GitLab)

    ·

    mentioned in issue #911

    By jlgrall on 2017-09-02T15:03:45 (imported from GitLab)

    Toggle commit list
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment