Skip to content

[stable30] Fix federated reshares#58992

Merged
sorbaugh merged 2 commits intostable30from
backport/58689/stable30
Apr 21, 2026
Merged

[stable30] Fix federated reshares#58992
sorbaugh merged 2 commits intostable30from
backport/58689/stable30

Conversation

@provokateurin
Copy link
Copy Markdown
Member

Manual backport of #58689

@provokateurin provokateurin added bug 3. to review Waiting for reviews labels Mar 17, 2026
@provokateurin provokateurin changed the title [stable30] fix(federatedfilesharing): Do not set the share id for an existing share [stable30] Fix federated reshares Mar 17, 2026
Comment thread apps/federatedfilesharing/lib/FederatedShareProvider.php Fixed
Comment thread apps/federatedfilesharing/lib/FederatedShareProvider.php Fixed
Comment thread apps/federatedfilesharing/lib/FederatedShareProvider.php Fixed
Comment thread apps/federatedfilesharing/lib/FederatedShareProvider.php Fixed
if ($send) {
$ownerCloudId = $this->cloudIdManager->getCloudId($remoteShare['owner'], $remoteShare['remote']);
$shareId = $this->addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $ownerCloudId->getId(), $permissions, 'tmp_token_' . time(), $shareType, $expirationDate);
[$token, $remoteId] = $this->notifications->requestReShare(

Check notice

Code scanning / Psalm

PossiblyInvalidArrayAccess Note

Cannot access array value on non-array variable of type false
if ($send) {
$ownerCloudId = $this->cloudIdManager->getCloudId($remoteShare['owner'], $remoteShare['remote']);
$shareId = $this->addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $ownerCloudId->getId(), $permissions, 'tmp_token_' . time(), $shareType, $expirationDate);
[$token, $remoteId] = $this->notifications->requestReShare(

Check notice

Code scanning / Psalm

PossiblyInvalidArrayAccess Note

Cannot access array value on non-array variable of type false
Comment thread apps/federatedfilesharing/lib/FederatedShareProvider.php Fixed
@salmart-dev
Copy link
Copy Markdown
Contributor

Same issue here with the share ID being int instead of string.

Comment thread apps/federatedfilesharing/lib/FederatedShareProvider.php Fixed
Comment thread apps/federatedfilesharing/lib/FederatedShareProvider.php Fixed
@provokateurin provokateurin force-pushed the backport/58689/stable30 branch from 3ed0dcc to 5f02191 Compare March 19, 2026 10:12
Comment thread apps/federatedfilesharing/lib/FederatedShareProvider.php Fixed
Comment thread apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php Fixed
Comment thread apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php Fixed
[$token, $remoteId] = $this->notifications->requestReShare(
$remoteShare['share_token'],
$remoteShare['remote_id'],
$shareId,

Check notice

Code scanning / Psalm

InvalidArgument Note

Argument 3 of OCA\FederatedFileSharing\Notifications::requestReShare expects string, but int provided
@provokateurin provokateurin force-pushed the backport/58689/stable30 branch from 5f02191 to bebc765 Compare March 19, 2026 14:17
@provokateurin provokateurin self-assigned this Apr 20, 2026
Signed-off-by: provokateurin <kate@provokateurin.de>
…r might on another server

Signed-off-by: provokateurin <kate@provokateurin.de>
@sorbaugh sorbaugh merged commit 08d012c into stable30 Apr 21, 2026
183 of 188 checks passed
@sorbaugh sorbaugh deleted the backport/58689/stable30 branch April 21, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants