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

Fixes #3447 Setting debug level to 0 during login

parent 269a9040
......@@ -141,8 +141,10 @@ if (!is_readable(CONFIG_DIR."/".CONFIG_FILE)) {
/* Parse configuration file */
$config = new config(CONFIG_DIR."/".CONFIG_FILE, $BASE_DIR);
session::global_set('DEBUGLEVEL', $config->get_cfg_value('DEBUGLEVEL'));
if ($_SERVER["REQUEST_METHOD"] != "POST") {
if ($_SERVER["REQUEST_METHOD"] == "POST") {
session::global_set('DEBUGLEVEL', 0);
} else {
session::global_set('DEBUGLEVEL', $config->get_cfg_value('DEBUGLEVEL'));
@DEBUG (DEBUG_CONFIG, __LINE__, __FUNCTION__, __FILE__, $config->data, "config");
}
......@@ -207,6 +209,9 @@ if (!$htaccess_authenticated) {
}
}
$config->set_current($server);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
session::global_set('DEBUGLEVEL', 0);
}
/* If SSL is forced, just forward to the SSL enabled site */
if (($config->get_cfg_value("forcessl") == "TRUE") && ($ssl != '')) {
......
......@@ -122,7 +122,6 @@ class password extends plugin
if (count($message)) {
msg_dialog::displayChecks($message);
} else {
/* Try to connect via current password */
$tldap = new LDAP(
$ui->dn,
......@@ -137,7 +136,6 @@ class password extends plugin
msg_dialog::display(_("Password change"),
_("The password you've entered as your current password doesn't match the real one."), WARNING_DIALOG);
} else {
/* Check FusionDirectory permissions */
if (!preg_match("/w/i", $password_ACLS)) {
msg_dialog::display(_("Password change"),
......
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