testing begins
This commit is contained in:
parent
5949607d17
commit
4119e1f9cc
@ -116,23 +116,23 @@ function common_friends_visitor_widget($profile_uid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FIXME
|
// FIXME
|
||||||
if(! $cid) {
|
// if(! $cid) {
|
||||||
if(get_my_url()) {
|
// if(get_my_url()) {
|
||||||
$r = q("select id from contact where nurl = '%s' and uid = %d limit 1",
|
// $r = q("select id from contact where nurl = '%s' and uid = %d limit 1",
|
||||||
dbesc(normalise_link(get_my_url())),
|
// dbesc(normalise_link(get_my_url())),
|
||||||
intval($profile_uid)
|
// intval($profile_uid)
|
||||||
);
|
// );
|
||||||
if(count($r))
|
// if(count($r))
|
||||||
$cid = $r[0]['id'];
|
// $cid = $r[0]['id'];
|
||||||
else {
|
// else {
|
||||||
$r = q("select id from gcontact where nurl = '%s' limit 1",
|
// $r = q("select id from gcontact where nurl = '%s' limit 1",
|
||||||
dbesc(normalise_link(get_my_url()))
|
// dbesc(normalise_link(get_my_url()))
|
||||||
);
|
// );
|
||||||
if(count($r))
|
// if(count($r))
|
||||||
$zcid = $r[0]['id'];
|
// $zcid = $r[0]['id'];
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if($cid == 0 && $zcid == 0)
|
if($cid == 0 && $zcid == 0)
|
||||||
return;
|
return;
|
||||||
|
@ -72,8 +72,8 @@ function post_init(&$a) {
|
|||||||
|
|
||||||
// Auth packets MUST use ultra top-secret hush-hush mode
|
// Auth packets MUST use ultra top-secret hush-hush mode
|
||||||
|
|
||||||
$p = zot_build_packet($c[0],$type = 'auth_check',array('guid' => $x[0]['hubloc_guid'],'guid_sig' => $x[0]['hubloc_guid_sig']), $x[0]['hubloc_prvkey'], $sec);
|
$p = zot_build_packet($c[0],$type = 'auth_check',array(array('guid' => $x[0]['hubloc_guid'],'guid_sig' => $x[0]['hubloc_guid_sig'])), $x[0]['hubloc_sitekey'], $sec);
|
||||||
$result = zot_zot($x[0]['hubloc_url'],$p);
|
$result = zot_zot($x[0]['hubloc_callback'],$p);
|
||||||
|
|
||||||
if($result['success']) {
|
if($result['success']) {
|
||||||
$j = json_decode($result['body'],true);
|
$j = json_decode($result['body'],true);
|
||||||
@ -276,7 +276,7 @@ function post_post(&$a) {
|
|||||||
$y = q("select xchan_pubkey from xchan where xchan_hash = '%s' limit 1",
|
$y = q("select xchan_pubkey from xchan where xchan_hash = '%s' limit 1",
|
||||||
dbesc($sender_hash)
|
dbesc($sender_hash)
|
||||||
);
|
);
|
||||||
if((! $y) || (! rsa_verify($data['secret'],$data['secret_sig'],$y[0]['xchan_pubkey']))) {
|
if((! $y) || (! rsa_verify($data['secret'],base64url_decode($data['secret_sig']),$y[0]['xchan_pubkey']))) {
|
||||||
logger('mod_zot: auth_check: sender not found or secret_sig invalid.');
|
logger('mod_zot: auth_check: sender not found or secret_sig invalid.');
|
||||||
json_return_and_die($ret);
|
json_return_and_die($ret);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user