Deck treats unset files_sharing server-to-server keys as disabled
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- docker, mysql, php
- 领域
- api, authorization, backend
调研方向
从 lib/Service/ConfigService.php 中的 ensureFederationEnabled() 开始,这里读取两个 files_sharing 键时默认值为 'no'。将这些默认值改为 'yes',使其与 FederatedShareProvider 保持一致。当单元测试显示两个键都未设置时联合功能可以通过,并且在 Deck 联合功能关闭或任一键为 'no' 时仍然抛出异常,即完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
ConfigService::ensureFederationEnabled() reads files_sharing/outgoing_server2server_share_enabled and incoming_server2server_share_enabled with a default of 'no':
https://github.com/nextcloud/deck/blob/bf65da22e13a366c70c72391beaee00ed2152810/lib/Service/ConfigService.php#L156-L161
Nextcloud itself defaults both to 'yes' (FederatedShareProvider::isOutgoingServer2serverShareEnabled()). On an instance where an admin never changed the federated sharing settings, the admin page shows federated sharing as enabled, but Deck refuses every federated share with "Federation is disabled". The instance also does not advertise deck in /.well-known/ocm, so shares from other servers fail too.
To Reproduce
- On an instance where the federated sharing settings were never changed, enable Deck federation (
occ config:app:set deck federationEnabled --value=yes). - Share a board with a federated user.
- The API returns 400 "Federation is disabled".
- Setting both keys explicitly to
yesmakes it work.
Expected behavior
Deck uses the same defaults as federated file sharing.
Suggested fix
Use 'yes' as the default for both keys in ConfigService::ensureFederationEnabled():
if ($this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') !== 'yes') {
throw new FederationDisabledException();
}
if ($this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') !== 'yes') {
throw new FederationDisabledException();
}
Unit tests can cover: Deck federation enabled with both keys unset passes; Deck federation off, or either key set to no, still throws. I tested this change with unit tests and on instance A with both keys deleted: sharing with a user on instance B works.
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
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nextcloud/deck 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
2 small URL Bugs未关闭1. to develop bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
Updating a card without `done` clears its done state可能已有人在做 @whoalin1 于 5 天前认领。 未关闭0. Needs triage bug
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
Updating a card on an incoming federated board without `done` returns 500可能已有人在做 @AlirezaAghaee1996 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
vecture-be/belgium-data-desk#181 ·
维护者通常 1 天内回复
-
enhancement frontend reconciliation UX
难度 2/5 1-3 小时 新手友好度 82/100
humlab-sead/sead_shape_shifter#882 ·
维护者通常 1 天内回复
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
erkamyaman/rust-anything#1381 ·
维护者通常 1 天内回复
-
a11y accessibility area: i18n area: pages area: sites bug i18n priority: P2 seo tech: javascript tests
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复