owa issue

This commit is contained in:
nobody 2021-08-29 05:03:08 -07:00
parent 4ed198380e
commit 0f1d940426
2 changed files with 4 additions and 4 deletions

View file

@ -33,7 +33,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' ) ",
where ( hubloc_addr = '%s' or hubloc_id_url = '%s' ) and xchan_pubkey != '' ",
dbesc(str_replace('acct:','',$keyId)),
dbesc($keyId)
);
@ -41,14 +41,14 @@ class Owa extends Controller {
$found = discover_by_webbie(str_replace('acct:','',$keyId));
if ($found) {
$r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash
where ( hubloc_addr = '%s' or hubloc_id_url = '%s' ) ",
where ( hubloc_addr = '%s' or hubloc_id_url = '%s' ) and xchan_pubkey != '' ",
dbesc(str_replace('acct:','',$keyId)),
dbesc($keyId)
);
}
}
if ($r) {
foreach ($r as $hubloc) {
foreach ($r as $hubloc) {
$verified = HTTPSig::verify(file_get_contents('php://input'), $hubloc['xchan_pubkey']);
if ($verified && $verified['header_signed'] && $verified['header_valid'] && ($verified['content_valid'] || (! $verified['content_signed']))) {
logger('OWA header: ' . print_r($verified,true),LOGGER_DATA);

View file

@ -164,7 +164,7 @@ class ZotSH(object):
bnewhost = bnewhost.encode('utf-8').hex()
r = session_home.get(
SERVER + "magic",
SERVER + "/magic",
params={'bdest': bnewhost, 'owa': 1},
allow_redirects=True,
verify=VERIFY_SSL )