Deck treats unset files_sharing server-to-server keys as disabled
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, mysql, php
- Lĩnh vực
- api, authorization, backend
Hướng nghiên cứu
Bắt đầu từ lib/Service/ConfigService.php, trong ensureFederationEnabled(), nơi cả hai khóa files_sharing được đọc với giá trị mặc định là 'no'. Đổi các giá trị mặc định này thành 'yes' để khớp với FederatedShareProvider. Hoàn thành khi các unit test cho thấy federation vẫn thông qua khi cả hai khóa chưa được đặt, và vẫn ném ngoại lệ khi federation của Deck bị tắt hoặc một trong hai khóa là 'no'.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.4k
- Fork
- 380
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 72
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nextcloud/deck
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
2 small URL BugsĐang mở1. to develop bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
nextcloud/deck#8834 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Updating a card without `done` clears its done stateCó thể đã có người làm @whoalin1 đã nhận 5 ngày trước. Đang mở0. Needs triage bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Updating a card on an incoming federated board without `done` returns 500Có thể đã có người làm @AlirezaAghaee1996 đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của nextcloud/deck
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vecture-be/belgium-data-desk#181 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement frontend reconciliation UX
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
humlab-sead/sead_shape_shifter#882 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
erkamyaman/rust-anything#1381 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
a11y accessibility area: i18n area: pages area: sites bug i18n priority: P2 seo tech: javascript tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
flisk-sh/chat#833 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày