Update security.php

This commit is contained in:
Namhyeon Go 2018-02-21 15:28:04 +09:00 committed by GitHub
parent 5deedc0f9c
commit af41bbc170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -375,17 +375,17 @@ if(!function_exists("get_clean_xss")) {
}
// support curl or jsonp(callback)
if(!function_exists("get_printable_access_token")) {
function get_printable_access_token($accesstoken, $callback="", $charset="utf-8") {
if(!function_exists("get_callable_token")) {
function get_callable_token($token, $callback="", $charset="utf-8") {
$callback = get_clean_xss($callback);
$retdata = "";
if(empty($callback)) {
$retdata = $accesstoken;
$retdata = $token;
} else {
$retdata = "function $callback { return '$accesstoken'; }";
$retdata = "function $callback() { return '$token'; }";
}
return $retdata;
}
}