aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Owa.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-06-01 08:15:33 +0000
committerMario <mario@mariovavti.com>2023-06-02 21:16:56 +0200
commit11ca5bb7d5f0e1b6139c48f9b26cb8278d33e8de (patch)
treeb541eaf62948b993488c429938e5c79a6f8fd141 /Zotlabs/Module/Owa.php
parente0838ff8ab3a3bd6f91a78d99512d17860ff8fa2 (diff)
downloadvolse-hubzilla-11ca5bb7d5f0e1b6139c48f9b26cb8278d33e8de.tar.gz
volse-hubzilla-11ca5bb7d5f0e1b6139c48f9b26cb8278d33e8de.tar.bz2
volse-hubzilla-11ca5bb7d5f0e1b6139c48f9b26cb8278d33e8de.zip
owa: workaround for friendica when using nginx until this will be fixed at their side and check prrofile uid for features instead of local channel
(cherry picked from commit 423fdc0a9618e322636a5291ed92df00115fafb0)
Diffstat (limited to 'Zotlabs/Module/Owa.php')
-rw-r--r--Zotlabs/Module/Owa.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/Zotlabs/Module/Owa.php b/Zotlabs/Module/Owa.php
index 02997d3f1..28f25e813 100644
--- a/Zotlabs/Module/Owa.php
+++ b/Zotlabs/Module/Owa.php
@@ -47,6 +47,10 @@ class Owa extends Controller {
}
if ($r) {
foreach ($r as $hubloc) {
+ // fix friendica accept header for nginx
+ if (str_starts_with($keyId, 'acct:') && $_SERVER['HTTP_ACCEPT'] === 'application/x-zot+json')
+ $_SERVER['HTTP_ACCEPT'] = 'application/x-dfrn+json, application/x-zot+json';
+
$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);