aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-12-11 11:32:37 +0000
committerMario <mario@mariovavti.com>2020-12-11 12:35:54 +0100
commit8c1c49a45ed28f5235d6a5f7668d2c31158fbea3 (patch)
treef9b54022db467180e0a1085cbd0bac04e2c46478 /Zotlabs
parentb1f001442973352e66c43beea70891ca52de4b5f (diff)
downloadvolse-hubzilla-8c1c49a45ed28f5235d6a5f7668d2c31158fbea3.tar.gz
volse-hubzilla-8c1c49a45ed28f5235d6a5f7668d2c31158fbea3.tar.bz2
volse-hubzilla-8c1c49a45ed28f5235d6a5f7668d2c31158fbea3.zip
fix hubloc issue in mod getfile
(cherry picked from commit b0b9b9f28974f9016e47491e81876224c57a7e3b)
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Getfile.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Module/Getfile.php b/Zotlabs/Module/Getfile.php
index 6d31d23fd..17d1c84b8 100644
--- a/Zotlabs/Module/Getfile.php
+++ b/Zotlabs/Module/Getfile.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module;
use Zotlabs\Web\HTTPSig;
+use Zotlabs\Lib\Libzot;
/**
* module: getfile
@@ -54,11 +55,11 @@ class Getfile extends \Zotlabs\Web\Controller {
if($keyId) {
$r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash
- where hubloc_addr = '%s' limit 1",
+ where hubloc_addr = '%s'",
dbesc(str_replace('acct:','',$keyId))
);
if($r) {
- $hubloc = $r[0];
+ $hubloc = Libzot::zot_record_preferred($r);
$verified = HTTPSig::verify('',$hubloc['xchan_pubkey']);
if($verified && $verified['header_signed'] && $verified['header_valid'] && $hash == $hubloc['hubloc_hash']) {
$header_verified = true;