mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 06:37:56 -04:00
fix(ocm): normalize protocol to support multi with webdav option
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
parent
aef64a814a
commit
f1039df8ac
1 changed files with 12 additions and 0 deletions
|
|
@ -106,6 +106,18 @@ class RequestHandlerController extends Controller {
|
|||
#[NoCSRFRequired]
|
||||
#[BruteForceProtection(action: 'receiveFederatedShare')]
|
||||
public function addShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, $protocol, $shareType, $resourceType) {
|
||||
// quick patch to flatten the protocol entry 'multi' to the previous 'webdav'. this is 32 only and a better implementation is expected for 33
|
||||
/** @psalm-suppress InvalidArrayOffset */
|
||||
if ((($protocol['name'] ?? '') === 'multi') && (is_array($protocol['webdav'] ?? ''))) {
|
||||
$protocol = [
|
||||
'name' => 'webdav',
|
||||
'options' => [
|
||||
'sharedSecret' => $protocol['webdav']['sharedSecret'] ?? '',
|
||||
'permissions' => '{http://open-cloud-mesh.org/ns}share-permissions',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
try {
|
||||
// if request is signed and well signed, no exception are thrown
|
||||
// if request is not signed and host is known for not supporting signed request, no exception are thrown
|
||||
|
|
|
|||
Loading…
Reference in a new issue