more zot6
This commit is contained in:
parent
62d6bada4c
commit
b5966041be
@ -19,12 +19,19 @@ class Post extends \Zotlabs\Web\Controller {
|
||||
function init() {
|
||||
if(array_key_exists('auth', $_REQUEST)) {
|
||||
$x = new \Zotlabs\Zot\Auth($_REQUEST);
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
function post() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$z = new \Zotlabs\Zot\Receiver($_REQUEST['data'], get_config('system', 'prvkey'), new \Zotlabs\Zot\ZotHandler());
|
||||
|
||||
// notreached;
|
||||
|
@ -95,13 +95,18 @@ class HTTPSig {
|
||||
$algorithm = 'sha512';
|
||||
}
|
||||
|
||||
if($key && function_exists($key)) {
|
||||
$result['signer'] = $sig_block['keyId'];
|
||||
$key = $key($sig_block['keyId']);
|
||||
}
|
||||
|
||||
if(! $key) {
|
||||
$result['signer'] = $sig_block['keyId'];
|
||||
$key = self::get_activitypub_key($sig_block['keyId']);
|
||||
}
|
||||
|
||||
if(! $key)
|
||||
return null;
|
||||
return $result;
|
||||
|
||||
$x = rsa_verify($signed_data,$sig_block['signature'],$key,$algorithm);
|
||||
|
||||
|
@ -629,13 +629,20 @@ function get_vcard_array($vc,$id) {
|
||||
if($vc->ADR) {
|
||||
foreach($vc->ADR as $adr) {
|
||||
$type = (($adr['TYPE']) ? vcard_translate_type((string)$adr['TYPE']) : '');
|
||||
$adrs[] = [
|
||||
$entry = [
|
||||
'type' => $type,
|
||||
'address' => $adr->getParts()
|
||||
];
|
||||
$last_entry = end($adrs);
|
||||
if($last_entry && is_array($adrs[$last_entry]['address']))
|
||||
array_walk($adrs[$last_entry]['address'],'array_escape_tags');
|
||||
|
||||
if(is_array($entry['address'])) {
|
||||
array_walk($entry['address'],'array_escape_tags');
|
||||
}
|
||||
else {
|
||||
$entry['address'] = (string) escape_tags($entry['address']);
|
||||
}
|
||||
|
||||
$adrs[] = $entry;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4188,6 +4188,7 @@ function zot_site_info($channel = null) {
|
||||
$ret['site']['url'] = z_root();
|
||||
$ret['site']['url_sig'] = base64url_encode(rsa_sign(z_root(),$signing_key,$sig_method));
|
||||
$ret['site']['zot_auth'] = z_root() . '/magic';
|
||||
$ret['site']['key'] = get_config('system','pubkey');
|
||||
|
||||
$dirmode = get_config('system','directory_mode');
|
||||
if(($dirmode === false) || ($dirmode == DIRECTORY_MODE_NORMAL))
|
||||
|
Reference in New Issue
Block a user