[KVE-2020-1276,1546] CSRF 취약점 제보로 1:1 문의 토큰 체크 코드 추가
This commit is contained in:
11
bbs/ajax.write.token.php
Normal file
11
bbs/ajax.write.token.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/json.lib.php');
|
||||
|
||||
$token_case = isset($_POST['token_case']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['token_case']) : '';
|
||||
|
||||
if( $token_case ){
|
||||
$token = _token();
|
||||
set_session('ss_'.$token_case.'_token', $token);
|
||||
die(json_encode(array('error'=>'', 'token'=>$token, 'url'=>'')));
|
||||
}
|
||||
Reference in New Issue
Block a user