Removing a remote participant does not reach the receiving server

未关闭
#8,789 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
php
领域
backend

调研方向

Start by comparing BoardService::deleteAcl() with addAcl() in lib/Service/BoardService.php, since addAcl already sends the update-permissions OCM notification that the removal path lacks. Then read DeckFederationProvider::notificationReceived() and ExternalBoardService on the receiving side, where 403/404 responses currently return empty data. Done means the receiver drops the board after revocation and revoked requests raise an error; the fix spans both servers, so check with maintainers on the approach first.

由索引模型根据 Issue 内容生成。

描述

Describe the bug
When the owner removes a federated participant from a board, the receiving server is not notified. The owner correctly refuses further requests (403), so no data is exposed, but the receiver keeps the board in its list:

  • opening the board returns a 500,
  • listing its stacks returns 200 with an empty list,
  • creating a card returns 200 with empty data, while nothing is created.

BoardService::deleteAcl() sends no OCM notification for PERMISSION_TYPE_REMOTE:
https://github.com/nextcloud/deck/blob/bf65da22e13a366c70c72391beaee00ed2152810/lib/Service/BoardService.php#L579

To Reproduce

  1. On instance A, share a board with a user on instance B. The board appears for that user.
  2. On instance A, remove that user from the board's sharing.
  3. On instance B, the board is still listed for the user.

Expected behavior
The receiver removes the board when the owner revokes the share, and requests to a revoked board return an error instead of an empty success.

Suggested fix
Not tested; a direction based on the current code.

  1. Owner: in BoardService::deleteAcl(), when the ACL is PERMISSION_TYPE_REMOTE, send an OCM notification to the participant's server before deleting the ACL, the same way addAcl() sends update-permissions (payload with sharedSecret = the ACL token, provider ID = board ID). Federated file sharing uses SHARE_UNSHARED for this.
  2. Receiver: handle that notification in DeckFederationProvider::notificationReceived(). Find the local board with BoardMapper::findByExternalId() and a matching shareToken, as the update-permissions case already does, then delete the participant's ACL, the board once no local participant is left, and the "remote board shared" notification.
  3. Receiver: when the owner answers 403 or 404 for an external board, ExternalBoardService should raise an error (for example NoPermissionException) instead of returning empty data. That also covers shares revoked before this change.

This may fit into the federated sharing work in #8114 / #8184.

Server details

Two instances, both Docker, MariaDB 11.8 / MySQL, PHP 8.5.13:

  • Instance A: Nextcloud 35.0.3, Deck 1.19.2
  • Instance B: Nextcloud 34.0.6, Deck 1.18.7

The code paths are unchanged on main (bf65da22e).


This report was drafted with AI assistance (Claude Code) and reproduced on the two instances above.

主要语言
JavaScript
星标
1.4k
派生
380
平均合并
1 天 17 小时
30 天内合并 PR
72

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/deck 的其他 Issue

查看 nextcloud/deck 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。