mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +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"));
|
||||
}
|
||||
|
||||
/* 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"];
|
||||
$email = $_POST["email"];
|
||||
$comment = $_POST["comment"];
|
||||
|
|
|
@ -103,6 +103,7 @@ $(document).ready( function() {
|
|||
$this->contentContainerStart();
|
||||
?>
|
||||
<form class="form-horizontal" action="../op/op.EditUserData.php" enctype="multipart/form-data" method="post" id="form">
|
||||
<?php echo createHiddenFieldWithKey('edituserdata'); ?>
|
||||
<?php
|
||||
$this->formField(
|
||||
getMLText("current_password"),
|
||||
|
|
Loading…
Reference in New Issue
Block a user