Check the hash of the token that was POSTed with the token in the session.
parent
861c0eadb4
commit
81bef8d973
|
@ -237,8 +237,10 @@ class UserController extends AbstractController {
|
||||||
return $this->executeIndex();
|
return $this->executeIndex();
|
||||||
}
|
}
|
||||||
$user_id = (isset($_GET['id'])) ? intval($_GET['id']) : 0;
|
$user_id = (isset($_GET['id'])) ? intval($_GET['id']) : 0;
|
||||||
|
if (!hash_equals($_POST['token'], $_SESSION['token'])) {
|
||||||
$fields = array('name', 'user_name', 'password', 'password_repeat', 'level', 'mobile', 'pushover_key', 'pushover_device', 'email');
|
return $this->executeIndex();
|
||||||
|
}
|
||||||
|
$fields = array('name', 'user_name', 'password', 'password_repeat', 'level', 'mobile', 'pushover_key', 'pushover_device', 'email', 'token');
|
||||||
$clean = array();
|
$clean = array();
|
||||||
foreach($fields as $field) {
|
foreach($fields as $field) {
|
||||||
if(isset($_POST[$field])) {
|
if(isset($_POST[$field])) {
|
||||||
|
|
Loading…
Reference in New Issue