couple of additional checks
This commit is contained in:
parent
d66d8ff524
commit
539988b62f
13
mod/post.php
13
mod/post.php
@ -172,17 +172,28 @@ function post_init(&$a) {
|
|||||||
|
|
||||||
$result = zot_zot($x[0]['hubloc_callback'],$p);
|
$result = zot_zot($x[0]['hubloc_callback'],$p);
|
||||||
|
|
||||||
$ret['message'] .= 'auth check request to your site returned .' . print_r($result, true) . EOL;
|
|
||||||
|
|
||||||
if(! $result['success']) {
|
if(! $result['success']) {
|
||||||
logger('mod_zot: auth_check callback failed.');
|
logger('mod_zot: auth_check callback failed.');
|
||||||
if($test) {
|
if($test) {
|
||||||
|
$ret['message'] .= 'auth check request to your site returned .' . print_r($result, true) . EOL;
|
||||||
json_return_and_die($ret);
|
json_return_and_die($ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
goaway($desturl);
|
goaway($desturl);
|
||||||
}
|
}
|
||||||
$j = json_decode($result['body'],true);
|
$j = json_decode($result['body'],true);
|
||||||
|
if(! $j) {
|
||||||
|
logger('mod_zot: auth_check json data malformed.');
|
||||||
|
if($test) {
|
||||||
|
$ret['message'] .= 'json malformed: ' . $result['body'] . EOL;
|
||||||
|
json_return_and_die($ret);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($test) {
|
||||||
|
$ret['message'] .= 'auth check request returned .' . print_r($j, true) . EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($already_authed || $j['success']) {
|
if($already_authed || $j['success']) {
|
||||||
|
Reference in New Issue
Block a user