aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-05-25 08:03:10 +0000
committerMario <mario@mariovavti.com>2023-05-25 08:03:10 +0000
commitd00860430f3d90e75a464cee03d3ff79c34715eb (patch)
treecc578b20b3bb3084a9227b30f5714f1b24c2258b /Zotlabs/Module
parentaf0b4a0fca36cf8f52e1ef5f569dfb9268d92905 (diff)
downloadvolse-hubzilla-d00860430f3d90e75a464cee03d3ff79c34715eb.tar.gz
volse-hubzilla-d00860430f3d90e75a464cee03d3ff79c34715eb.tar.bz2
volse-hubzilla-d00860430f3d90e75a464cee03d3ff79c34715eb.zip
owa fixes for where keyId = acct:xxx@yyy.zz
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Owa.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/Zotlabs/Module/Owa.php b/Zotlabs/Module/Owa.php
index 02997d3f1..920a92240 100644
--- a/Zotlabs/Module/Owa.php
+++ b/Zotlabs/Module/Owa.php
@@ -32,7 +32,7 @@ class Owa extends Controller {
$keyId = $sigblock['keyId'];
if ($keyId) {
$r = q("SELECT * FROM hubloc LEFT JOIN xchan ON hubloc_hash = xchan_hash
- WHERE ( hubloc_addr = '%s' OR hubloc_id_url = '%s' ) AND hubloc_deleted = 0 AND xchan_pubkey != '' ORDER BY hubloc_id DESC",
+ WHERE (hubloc_addr = '%s' OR hubloc_id_url = '%s') AND hubloc_deleted = 0 AND xchan_pubkey != '' ORDER BY hubloc_id DESC",
dbesc(str_replace('acct:', '', $keyId)),
dbesc($keyId)
);
@@ -40,11 +40,13 @@ class Owa extends Controller {
$found = discover_by_webbie($keyId);
if ($found) {
$r = q("SELECT * FROM hubloc LEFT JOIN xchan ON hubloc_hash = xchan_hash
- WHERE hubloc_id_url = '%s' AND hubloc_deleted = 0 AND xchan_pubkey != '' ORDER BY hubloc_id DESC ",
+ WHERE (hubloc_addr = '%s' OR hubloc_id_url = '%s') AND hubloc_deleted = 0 AND xchan_pubkey != '' ORDER BY hubloc_id DESC ",
+ dbesc(str_replace('acct:', '', $keyId)),
dbesc($keyId)
);
}
}
+
if ($r) {
foreach ($r as $hubloc) {
$verified = HTTPSig::verify(file_get_contents('php://input'), $hubloc['xchan_pubkey']);
@@ -73,7 +75,8 @@ class Owa extends Controller {
if ($found) {
$r = q("SELECT * FROM hubloc LEFT JOIN xchan ON hubloc_hash = xchan_hash
- WHERE hubloc_id_url = '%s' AND hubloc_deleted = 0 ORDER BY hubloc_id DESC LIMIT 1",
+ WHERE (hubloc_addr = '%s' OR hubloc_id_url = '%s') AND hubloc_deleted = 0 ORDER BY hubloc_id DESC LIMIT 1",
+ dbesc(str_replace('acct:', '', $keyId)),
dbesc($keyId)
);