aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2020-12-12 10:07:39 +0100
committerMax Kostikov <max@kostikov.co>2020-12-12 10:07:39 +0100
commita4b83327c2f47bbe00ee9a81f4f0fb065f041ee3 (patch)
treef9b54022db467180e0a1085cbd0bac04e2c46478 /Zotlabs/Module
parent92eb7a0be4faac80ea86a88b1c249e273dbfeb9f (diff)
parent8c1c49a45ed28f5235d6a5f7668d2c31158fbea3 (diff)
downloadvolse-hubzilla-a4b83327c2f47bbe00ee9a81f4f0fb065f041ee3.tar.gz
volse-hubzilla-a4b83327c2f47bbe00ee9a81f4f0fb065f041ee3.tar.bz2
volse-hubzilla-a4b83327c2f47bbe00ee9a81f4f0fb065f041ee3.zip
Merge branch 'dev' into 'dev'
Dev sync See merge request kostikov/core!3
Diffstat (limited to 'Zotlabs/Module')
-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;