Commit 117ecbc8 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(recovery) Fix recovery to use new standAlonePage workflow

This should fix CSRF crashes with recovery

issue #5854
Showing with 10 additions and 13 deletions
+10 -13
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2011-2016 FusionDirectory
Copyright (C) 2011-2018 FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -18,14 +18,8 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
require_once("../include/php_setup.inc");
require_once("functions.inc");
require_once("variables.inc");
require_once('../include/php_setup.inc');
require_once('functions.inc');
require_once('variables.inc');
$pwRecovery = new passwordRecovery();
$pwRecovery->execute();
$pwRecovery->displayPWchanger();
?>
passwordRecovery::run();
......@@ -9,6 +9,7 @@
<div id="window-div">
<form action='recovery.php{$params}' method='post' name='mainform' onSubmit='js_check(this);return true;'>
<input type="hidden" name="CSRFtoken" value="{$CSRFtoken}"/>
<div id="window-titlebar">
<p>
......
......@@ -66,7 +66,7 @@ class passwordRecovery extends standAlonePage {
}
}
function execute()
function save_object()
{
if (!$this->activated) {
return;
......@@ -98,8 +98,10 @@ class passwordRecovery extends standAlonePage {
}
}
function displayPWchanger()
function execute()
{
$this->save_object();
/* Do we need to show error messages? */
if (count($this->message) != 0) {
/* Show error message and continue editing */
......
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