From 85b7c90637b03d4f3093f6a3557d807dbd6dd8b3 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 7 Dec 2017 18:56:26 -0800 Subject: strip acct: from OWA auth to API endpoints --- include/api_auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/api_auth.php') diff --git a/include/api_auth.php b/include/api_auth.php index 0818fa54b..5c0bcb317 100644 --- a/include/api_auth.php +++ b/include/api_auth.php @@ -52,6 +52,7 @@ function api_login(&$a){ /* Signature authentication */ if(array_key_exists($head,$_SERVER) && substr(trim($_SERVER[$head]),0,9) === 'Signature') { + if($head !== 'HTTP_AUTHORIZATION') { $_SERVER['HTTP_AUTHORIZATION'] = $_SERVER[$head]; continue; @@ -59,7 +60,7 @@ function api_login(&$a){ $sigblock = \Zotlabs\Web\HTTPSig::parse_sigheader($_SERVER[$head]); if($sigblock) { - $keyId = $sigblock['keyId']; + $keyId = str_replace('acct:','',$sigblock['keyId']); if($keyId) { $r = q("select * from hubloc where hubloc_addr = '%s' limit 1", dbesc($keyId) -- cgit v1.2.3