Version 3.5.3

1. 增加referer校验防御CSRF
2. 修复若干小bug
3. 更新IP库
This commit is contained in:
firesun
2022-05-24 00:13:20 +08:00
parent ead56abef5
commit 82227be6bd
17 changed files with 124 additions and 117 deletions

11
api.php
View File

@@ -1,10 +1,17 @@
<?php
error_reporting(0);
define("IN_XSS_PLATFORM", true);
define('IN_XSS_PLATFORM', true);
require_once('auth.php');
require_once("dio.php");
require_once('dio.php');
header('Content-Type: application/json');
$referer_array = parse_url($_SERVER['HTTP_REFERER']);
//CSRF防御
if($referer_array['host'] != $_SERVER['HTTP_HOST']) {
exit('Access Denied');
}
//与xss记录相关api
if ( isset( $_GET['cmd'] ) ) {
switch ( $_GET['cmd'] ) {