mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-09-09 11:29:01 +00:00
add csrf protection
This commit is contained in:
parent
ef20172f57
commit
44813338b1
|
@ -37,6 +37,11 @@ if (!$user->isAdmin() && ($settings->_disableSelfEdit)) {
|
||||||
UI::exitError(getMLText("edit_user_details"),getMLText("access_denied"));
|
UI::exitError(getMLText("edit_user_details"),getMLText("access_denied"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check if the form data comes from a trusted request */
|
||||||
|
if(!checkFormKey('edituserdata')) {
|
||||||
|
UI::exitError(getMLText("edit_user_details"),getMLText("invalid_request_token"));
|
||||||
|
}
|
||||||
|
|
||||||
$fullname = $_POST["fullname"];
|
$fullname = $_POST["fullname"];
|
||||||
$email = $_POST["email"];
|
$email = $_POST["email"];
|
||||||
$comment = $_POST["comment"];
|
$comment = $_POST["comment"];
|
||||||
|
|
|
@ -103,6 +103,7 @@ $(document).ready( function() {
|
||||||
$this->contentContainerStart();
|
$this->contentContainerStart();
|
||||||
?>
|
?>
|
||||||
<form class="form-horizontal" action="../op/op.EditUserData.php" enctype="multipart/form-data" method="post" id="form">
|
<form class="form-horizontal" action="../op/op.EditUserData.php" enctype="multipart/form-data" method="post" id="form">
|
||||||
|
<?php echo createHiddenFieldWithKey('edituserdata'); ?>
|
||||||
<?php
|
<?php
|
||||||
$this->formField(
|
$this->formField(
|
||||||
getMLText("current_password"),
|
getMLText("current_password"),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user