aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-12-11 11:32:37 +0000
committerMario <mario@mariovavti.com>2020-12-12 19:36:42 +0100
commit8720931a537028db3b35f2c6afe8f3653408d8f9 (patch)
treedbde6a3d3f41ea85f8d8e90d78767c8941a931da /Zotlabs/Module
parentd60c53cd12beb987aabb75ecbce7f26fc15bd9eb (diff)
downloadvolse-hubzilla-8720931a537028db3b35f2c6afe8f3653408d8f9.tar.gz
volse-hubzilla-8720931a537028db3b35f2c6afe8f3653408d8f9.tar.bz2
volse-hubzilla-8720931a537028db3b35f2c6afe8f3653408d8f9.zip
fix hubloc issue in mod getfile
(cherry picked from commit b0b9b9f28974f9016e47491e81876224c57a7e3b) (cherry picked from commit 8c1c49a45ed28f5235d6a5f7668d2c31158fbea3)
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;