only log zot_refresh content if json decode was successful.
This commit is contained in:
parent
e6139c9f49
commit
e685c580f2
@ -310,8 +310,6 @@ function zot_refresh($them, $channel = null, $force = false) {
|
|||||||
|
|
||||||
$result = z_post_url($url . $rhs,$postvars);
|
$result = z_post_url($url . $rhs,$postvars);
|
||||||
|
|
||||||
logger('zot_refresh: zot-info: ' . print_r($result,true), LOGGER_DATA, LOG_DEBUG);
|
|
||||||
|
|
||||||
if ($result['success']) {
|
if ($result['success']) {
|
||||||
|
|
||||||
$j = json_decode($result['body'],true);
|
$j = json_decode($result['body'],true);
|
||||||
@ -321,6 +319,8 @@ function zot_refresh($them, $channel = null, $force = false) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger('zot-info: ' . print_r($result,true), LOGGER_DATA, LOG_DEBUG);
|
||||||
|
|
||||||
$signed_token = ((is_array($j) && array_key_exists('signed_token',$j)) ? $j['signed_token'] : null);
|
$signed_token = ((is_array($j) && array_key_exists('signed_token',$j)) ? $j['signed_token'] : null);
|
||||||
if($signed_token) {
|
if($signed_token) {
|
||||||
$valid = rsa_verify('token.' . $token,base64url_decode($signed_token),$j['key']);
|
$valid = rsa_verify('token.' . $token,base64url_decode($signed_token),$j['key']);
|
||||||
|
Reference in New Issue
Block a user