aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorAndrzej Budziński <andrzej@budzinski.ovh>2021-02-03 15:00:24 +0100
committerAndrzej Budziński <andrzej@budzinski.ovh>2021-02-03 15:00:24 +0100
commitba73845badef5c653c05c70ca27a5b37e2f25f97 (patch)
tree6b22545076df5f80b8714f07e92a518af24f0dc5 /Zotlabs
parent7ece28b9814e6bc7ea2879335520641561dc0ba5 (diff)
parent34b28cd8d36c7805e65c442ff1588ccf5165387a (diff)
downloadvolse-hubzilla-ba73845badef5c653c05c70ca27a5b37e2f25f97.tar.gz
volse-hubzilla-ba73845badef5c653c05c70ca27a5b37e2f25f97.tar.bz2
volse-hubzilla-ba73845badef5c653c05c70ca27a5b37e2f25f97.zip
Merge branch 'dev' into translation-pl
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Daemon/Convo.php2
-rw-r--r--Zotlabs/Lib/Apps.php2
-rw-r--r--Zotlabs/Lib/Enotify.php2
-rw-r--r--Zotlabs/Lib/Libzot.php6
-rw-r--r--Zotlabs/Lib/Libzotdir.php3
-rw-r--r--Zotlabs/Web/HTTPSig.php10
6 files changed, 14 insertions, 11 deletions
diff --git a/Zotlabs/Daemon/Convo.php b/Zotlabs/Daemon/Convo.php
index f7478d778..940216b2c 100644
--- a/Zotlabs/Daemon/Convo.php
+++ b/Zotlabs/Daemon/Convo.php
@@ -49,7 +49,7 @@ class Convo {
// and that lets us use implied_create
$AS = new ActivityStreams($message);
if ($AS->is_valid() && is_array($AS->obj)) {
- $item = Activity::decode_note($AS, true);
+ $item = Activity::decode_note($AS);
Activity::store($channel, $contact['abook_xchan'], $AS, $item);
}
}
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index 05b2ba177..d77a3fda2 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -307,7 +307,7 @@ class Apps {
}
}
}
- if($ret) {
+ if(isset($ret)) {
if($translate)
self::translate_system_apps($ret);
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php
index 3a24cd349..d2a0f0abc 100644
--- a/Zotlabs/Lib/Enotify.php
+++ b/Zotlabs/Lib/Enotify.php
@@ -43,7 +43,7 @@ class Enotify {
dbesc($params['to_xchan'])
);
}
- if ($x & $y) {
+ if ($x && $y) {
$sender = $x[0];
$recip = $y[0];
} else {
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index fd30f05f5..0ead8402e 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -763,8 +763,8 @@ class Libzot {
'xchan_guid' => $arr['id'],
'xchan_guid_sig' => $arr['id_sig'],
'xchan_pubkey' => $arr['public_key'],
- 'xchan_photo_mimetype' => $arr['photo_mimetype'],
- 'xchan_photo_l' => $arr['photo'],
+ 'xchan_photo_mimetype' => $arr['photo']['type'],
+ 'xchan_photo_l' => $arr['photo']['url'],
'xchan_addr' => escape_tags($arr['primary_location']['address']),
'xchan_url' => escape_tags($arr['primary_location']['url']),
'xchan_connurl' => $arr['primary_location']['connections_url'],
@@ -772,7 +772,7 @@ class Libzot {
'xchan_connpage' => $arr['connect_url'],
'xchan_name' => (($arr['name']) ? escape_tags($arr['name']) : '-'),
'xchan_network' => 'zot6',
- 'xchan_photo_date' => $arr['photo_updated'],
+ 'xchan_photo_date' => $arr['photo']['updated'],
'xchan_name_date' => $arr['name_updated'],
'xchan_hidden' => intval(1 - intval($arr['searchable'])),
'xchan_selfcensored' => $arr['adult_content'],
diff --git a/Zotlabs/Lib/Libzotdir.php b/Zotlabs/Lib/Libzotdir.php
index d4c5398ee..41c0a54e9 100644
--- a/Zotlabs/Lib/Libzotdir.php
+++ b/Zotlabs/Lib/Libzotdir.php
@@ -311,12 +311,13 @@ class Libzotdir {
if ($ud['ud_addr'] && (! ($ud['ud_flags'] & UPDATE_FLAGS_DELETED))) {
$success = false;
+ $zf = [];
$href = Webfinger::zot_url(punify($ud['ud_addr']));
if($href) {
$zf = Zotfinger::exec($href);
}
- if(is_array($zf) && array_path_exists('signature/signer',$zf) && $zf['signature']['signer'] === $href && intval($zf['signature']['header_valid'])) {
+ if(array_path_exists('signature/signer',$zf) && $zf['signature']['signer'] === $href && intval($zf['signature']['header_valid'])) {
$xc = Libzot::import_xchan($zf['data'], 0, $ud);
}
else {
diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php
index 0b3e2bf2e..7c3903682 100644
--- a/Zotlabs/Web/HTTPSig.php
+++ b/Zotlabs/Web/HTTPSig.php
@@ -161,6 +161,8 @@ class HTTPSig {
logger('verified: ' . $x, LOGGER_DEBUG);
+ $fetched_key = '';
+
if(! $x) {
// try again, ignoring the local actor (xchan) cache and refetching the key
@@ -244,7 +246,7 @@ class HTTPSig {
}
- function convertKey($key) {
+ static function convertKey($key) {
if(strstr($key,'RSA ')) {
return rsatopem($key);
@@ -267,7 +269,7 @@ class HTTPSig {
* false if no pub key found, otherwise return the pub key
*/
- function get_activitystreams_key($id) {
+ static function get_activitystreams_key($id) {
// remove fragment
@@ -298,7 +300,7 @@ class HTTPSig {
}
- function get_webfinger_key($id) {
+ static function get_webfinger_key($id) {
$x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_addr = '%s' or hubloc_id_url = '%s'",
dbesc(str_replace('acct:','',$id)),
@@ -333,7 +335,7 @@ class HTTPSig {
return (($key['public_key']) ? $key : false);
}
- function get_zotfinger_key($id) {
+ static function get_zotfinger_key($id) {
$x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_addr = '%s' or hubloc_id_url = '%s' and hubloc_network = 'zot6'",
dbesc(str_replace('acct:','',$id)),