aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-12-09 14:43:53 +0100
committerJoas Schilling <coding@schilljs.com>2024-12-09 14:43:53 +0100
commitf1e2970040b55ac485d5eccd2b76235a9156bcc3 (patch)
tree0ea5e0cda36b7434fcd6bf0f47cca3eeeb34d235 /lib
parent6f3ee6b09a27cedf49c56b981d6d21fd852b4838 (diff)
downloadnextcloud-server-f1e2970040b55ac485d5eccd2b76235a9156bcc3.tar.gz
nextcloud-server-f1e2970040b55ac485d5eccd2b76235a9156bcc3.zip
fix(federation): Restore compatibility with Nextcloud 30 servers
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/OCM/Model/OCMProvider.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/private/OCM/Model/OCMProvider.php b/lib/private/OCM/Model/OCMProvider.php
index 61005d3089d..7ae413fa136 100644
--- a/lib/private/OCM/Model/OCMProvider.php
+++ b/lib/private/OCM/Model/OCMProvider.php
@@ -182,12 +182,14 @@ class OCMProvider implements IOCMProvider {
}
$this->setResourceTypes($resources);
- // import details about the remote request signing public key, if available
- $signatory = new Signatory();
- $signatory->setKeyId($data['publicKey']['keyId'] ?? '');
- $signatory->setPublicKey($data['publicKey']['publicKeyPem'] ?? '');
- if ($signatory->getKeyId() !== '' && $signatory->getPublicKey() !== '') {
- $this->setSignatory($signatory);
+ if (isset($data['publicKey'])) {
+ // import details about the remote request signing public key, if available
+ $signatory = new Signatory();
+ $signatory->setKeyId($data['publicKey']['keyId'] ?? '');
+ $signatory->setPublicKey($data['publicKey']['publicKeyPem'] ?? '');
+ if ($signatory->getKeyId() !== '' && $signatory->getPublicKey() !== '') {
+ $this->setSignatory($signatory);
+ }
}
if (!$this->looksValid()) {