mirror of
https://github.com/Mibew/i18n.git
synced 2025-02-02 17:44:42 +03:00
Fix multiple CSRF vulnerabilities
This commit is contained in:
parent
9aef0fb2d4
commit
03265a1fb0
@ -21,6 +21,8 @@ require_once('../libs/operator.php');
|
|||||||
require_once('../libs/pagination.php');
|
require_once('../libs/pagination.php');
|
||||||
|
|
||||||
$operator = check_login();
|
$operator = check_login();
|
||||||
|
csrfchecktoken();
|
||||||
|
|
||||||
$page = array('banId' => '');
|
$page = array('banId' => '');
|
||||||
$page['saved'] = false;
|
$page['saved'] = false;
|
||||||
$page['thread'] = '';
|
$page['thread'] = '';
|
||||||
|
@ -21,6 +21,8 @@ require_once('../libs/operator.php');
|
|||||||
require_once('../libs/pagination.php');
|
require_once('../libs/pagination.php');
|
||||||
|
|
||||||
$operator = check_login();
|
$operator = check_login();
|
||||||
|
csrfchecktoken();
|
||||||
|
|
||||||
$page = array();
|
$page = array();
|
||||||
$errors = array();
|
$errors = array();
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ require_once('../libs/operator.php');
|
|||||||
require_once('../libs/groups.php');
|
require_once('../libs/groups.php');
|
||||||
|
|
||||||
$operator = check_login();
|
$operator = check_login();
|
||||||
|
csrfchecktoken();
|
||||||
|
|
||||||
function get_group_members($groupid)
|
function get_group_members($groupid)
|
||||||
{
|
{
|
||||||
|
@ -19,6 +19,7 @@ require_once('../libs/common.php');
|
|||||||
require_once('../libs/operator.php');
|
require_once('../libs/operator.php');
|
||||||
|
|
||||||
$operator = check_login();
|
$operator = check_login();
|
||||||
|
csrfchecktoken();
|
||||||
|
|
||||||
if (isset($_GET['act']) && $_GET['act'] == 'del') {
|
if (isset($_GET['act']) && $_GET['act'] == 'del') {
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ require_once('../libs/operator.php');
|
|||||||
require_once('../libs/operator_settings.php');
|
require_once('../libs/operator_settings.php');
|
||||||
|
|
||||||
$operator = check_login();
|
$operator = check_login();
|
||||||
|
csrfchecktoken();
|
||||||
|
|
||||||
function update_operator_groups($operatorid, $newvalue)
|
function update_operator_groups($operatorid, $newvalue)
|
||||||
{
|
{
|
||||||
|
@ -42,6 +42,7 @@ require_once('inc_errors.php');
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<form name="banForm" method="post" action="<?php echo $webimroot ?>/operator/ban.php">
|
<form name="banForm" method="post" action="<?php echo $webimroot ?>/operator/ban.php">
|
||||||
|
<?php print_csrf_token_input() ?>
|
||||||
<input type="hidden" name="banId" value="<?php echo htmlspecialchars($page['banId']) ?>"/>
|
<input type="hidden" name="banId" value="<?php echo htmlspecialchars($page['banId']) ?>"/>
|
||||||
<?php if( $page['threadid'] ) { ?>
|
<?php if( $page['threadid'] ) { ?>
|
||||||
<input type="hidden" name="threadid" value="<?php echo htmlspecialchars($page['threadid']) ?>"/>
|
<input type="hidden" name="threadid" value="<?php echo htmlspecialchars($page['threadid']) ?>"/>
|
||||||
|
@ -81,7 +81,7 @@ if( $page['pagination.items'] ) {
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="removelink" id="i<?php echo htmlspecialchars($b['banid']) ?>" href="<?php echo $webimroot ?>/operator/blocked.php?act=del&id=<?php echo urlencode($b['banid']) ?>">
|
<a class="removelink" id="i<?php echo htmlspecialchars($b['banid']) ?>" href="<?php echo $webimroot ?>/operator/blocked.php?act=del&id=<?php echo urlencode($b['banid']) ?><?php print_csrf_token_in_url() ?>">
|
||||||
remove
|
remove
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
@ -40,6 +40,7 @@ require_once('inc_errors.php');
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<form name="groupForm" method="post" action="<?php echo $webimroot ?>/operator/group.php">
|
<form name="groupForm" method="post" action="<?php echo $webimroot ?>/operator/group.php">
|
||||||
|
<?php print_csrf_token_input() ?>
|
||||||
<input type="hidden" name="gid" value="<?php echo htmlspecialchars($page['grid']) ?>"/>
|
<input type="hidden" name="gid" value="<?php echo htmlspecialchars($page['grid']) ?>"/>
|
||||||
<div>
|
<div>
|
||||||
<?php print_tabbar(); ?>
|
<?php print_tabbar(); ?>
|
||||||
|
@ -91,7 +91,7 @@ if(count($page['groups']) > 0) {
|
|||||||
</td>
|
</td>
|
||||||
<?php if($page['canmodify']) { ?>
|
<?php if($page['canmodify']) { ?>
|
||||||
<td>
|
<td>
|
||||||
<a href="<?php echo $webimroot ?>/operator/groups.php?act=del&gid=<?php echo urlencode($grp['groupid']) ?>" id="i<?php echo htmlspecialchars($grp['groupid']) ?>" class="removelink">
|
<a href="<?php echo $webimroot ?>/operator/groups.php?act=del&gid=<?php echo urlencode($grp['groupid']) ?><?php print_csrf_token_in_url() ?>" id="i<?php echo htmlspecialchars($grp['groupid']) ?>" class="removelink">
|
||||||
remove
|
remove
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user