Fix ActivityPub with Nextcloud
authorMichael <heluecht@pirati.ca>
Mon, 17 Dec 2018 20:13:56 +0000 (20:13 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 17 Dec 2018 20:13:56 +0000 (20:13 +0000)
src/Module/Inbox.php
src/Util/HTTPSignature.php

index 25312bd..692e404 100644 (file)
@@ -9,6 +9,7 @@ use Friendica\Protocol\ActivityPub;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\Util\HTTPSignature;
+use Friendica\Core\Logger;
 
 /**
  * ActivityPub Inbox
index 956d6ff..07ff5e8 100644 (file)
@@ -204,6 +204,8 @@ class HTTPSignature
 
                if (preg_match('/algorithm="(.*?)"/ism', $header, $matches)) {
                        $ret['algorithm'] = $matches[1];
+               } else {
+                       $ret['algorithm'] = 'rsa-sha256';
                }
 
                if (preg_match('/headers="(.*?)"/ism', $header, $matches)) {