mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
Fix fox CSRF in /dowload/web-log/
This commit is contained in:
parent
329c37a13c
commit
63861e4ffd
2 changed files with 9 additions and 2 deletions
|
@ -3,6 +3,13 @@
|
||||||
error_reporting(NULL);
|
error_reporting(NULL);
|
||||||
session_start();
|
session_start();
|
||||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||||
|
|
||||||
|
// Check token
|
||||||
|
if ((!isset($_GET['token'])) || ($_SESSION['token'] != $_GET['token'])) {
|
||||||
|
header('Location: /login/');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
$v_domain = $_GET['domain'];
|
$v_domain = $_GET['domain'];
|
||||||
$v_domain = escapeshellarg($_GET['domain']);
|
$v_domain = escapeshellarg($_GET['domain']);
|
||||||
if ($_GET['type'] == 'access') $type = 'access';
|
if ($_GET['type'] == 'access') $type = 'access';
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
<div class="l-menu clearfix">
|
<div class="l-menu clearfix">
|
||||||
<div class="l-menu__item <?php if($_GET['type'] == 'access') echo 'l-menu__item--active' ?>"><a href="/list/web-log/?domain=<?=htmlentities($_GET['domain'])?>&type=access"><?=__('AccessLog')?></a></div>
|
<div class="l-menu__item <?php if($_GET['type'] == 'access') echo 'l-menu__item--active' ?>"><a href="/list/web-log/?domain=<?=htmlentities($_GET['domain'])?>&type=access"><?=__('AccessLog')?></a></div>
|
||||||
<div class="l-menu__item <?php if($_GET['type'] == 'error') echo 'l-menu__item--active' ?>"><a href="/list/web-log/?domain=<?=htmlentities($_GET['domain'])?>&type=error"><?=__('ErrorLog')?></a></div>
|
<div class="l-menu__item <?php if($_GET['type'] == 'error') echo 'l-menu__item--active' ?>"><a href="/list/web-log/?domain=<?=htmlentities($_GET['domain'])?>&type=error"><?=__('ErrorLog')?></a></div>
|
||||||
<div class="l-menu__item"><a href="/download/web-log/?domain=<?=htmlentities($_GET['domain'])?>&type=access"><?=__('Download AccessLog')?></a></div>
|
<div class="l-menu__item"><a href="/download/web-log/?domain=<?=htmlentities($_GET['domain'])?>&type=access&token=<?=$_SESSION['token']?>"><?=__('Download AccessLog')?></a></div>
|
||||||
<div class="l-menu__item"><a href="/download/web-log/?domain=<?=htmlentities($_GET['domain'])?>&type=error"><?=__('Download ErrorLog')?></a></div>
|
<div class="l-menu__item"><a href="/download/web-log/?domain=<?=htmlentities($_GET['domain'])?>&type=error&token=<?=$_SESSION['token']?>"><?=__('Download ErrorLog')?></a></div>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.l-menu -->
|
<!-- /.l-menu -->
|
||||||
<div class="l-profile">
|
<div class="l-profile">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue