mirror of
https://github.com/itflow-org/itflow
synced 2026-03-11 08:14:52 +00:00
services: Add missing CSRF checks rename unarchive to restore
This commit is contained in:
@@ -15,6 +15,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<?php if ($client_id) { ?>
|
<?php if ($client_id) { ?>
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id ?>">
|
<input type="hidden" name="client_id" value="<?php echo $client_id ?>">
|
||||||
<input type="hidden" name="service_id" value="<?php echo $service_id ?>">
|
<input type="hidden" name="service_id" value="<?php echo $service_id ?>">
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
|||||||
|
|
||||||
if (isset($_POST['add_service'])) {
|
if (isset($_POST['add_service'])) {
|
||||||
|
|
||||||
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
@@ -84,6 +86,8 @@ if (isset($_POST['add_service'])) {
|
|||||||
|
|
||||||
if (isset($_POST['edit_service'])) {
|
if (isset($_POST['edit_service'])) {
|
||||||
|
|
||||||
|
validateCSRFToken($_POST['csrf_token']);
|
||||||
|
|
||||||
enforceUserPermission('module_support', 2);
|
enforceUserPermission('module_support', 2);
|
||||||
|
|
||||||
$client_id = intval($_POST['client_id']);
|
$client_id = intval($_POST['client_id']);
|
||||||
|
|||||||
Reference in New Issue
Block a user