Update security.php
This commit is contained in:
parent
5deedc0f9c
commit
af41bbc170
|
@ -375,17 +375,17 @@ if(!function_exists("get_clean_xss")) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// support curl or jsonp(callback)
|
// support curl or jsonp(callback)
|
||||||
if(!function_exists("get_printable_access_token")) {
|
if(!function_exists("get_callable_token")) {
|
||||||
function get_printable_access_token($accesstoken, $callback="", $charset="utf-8") {
|
function get_callable_token($token, $callback="", $charset="utf-8") {
|
||||||
$callback = get_clean_xss($callback);
|
$callback = get_clean_xss($callback);
|
||||||
$retdata = "";
|
$retdata = "";
|
||||||
|
|
||||||
if(empty($callback)) {
|
if(empty($callback)) {
|
||||||
$retdata = $accesstoken;
|
$retdata = $token;
|
||||||
} else {
|
} else {
|
||||||
$retdata = "function $callback { return '$accesstoken'; }";
|
$retdata = "function $callback() { return '$token'; }";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $retdata;
|
return $retdata;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user