관리자 CSRF 취약점 수정
This commit is contained in:
14
adm/ajax.token.php
Normal file
14
adm/ajax.token.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/json.lib.php');
|
||||
|
||||
set_session('ss_admin_token', '');
|
||||
|
||||
$error = admin_referer_check(true);
|
||||
if($error)
|
||||
die(json_encode(array('error'=>$error, 'url'=>G5_URL)));
|
||||
|
||||
$token = get_admin_token();
|
||||
|
||||
die(json_encode(array('error'=>'', 'token'=>$token, 'url'=>'')));
|
||||
?>
|
||||
Reference in New Issue
Block a user