Receiver with Deck federation disabled answers "Internal error"
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue nà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
- 82/100
Hướng nghiên cứu
Phần sửa nằm trong lib/Federation/DeckFederationProvider.php, ở shareReceived(), nơi FederationDisabledException thoát ra gần dòng 49. Hãy so sánh với cách CloudFederationProviderFiles::shareReceived() chuyển trạng thái bị vô hiệu hóa thành ProviderCouldNotAddShareException với mã 503. Việc được coi là hoàn tất khi một unit test cho thấy không có board nào được chèn khi federation bị vô hiệu hóa, và ngoại lệ được ném ra mang mã trạng thái 503 cùng một thông báo rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
When a board share arrives on an instance where Deck federation is disabled, DeckFederationProvider::shareReceived() lets FederationDisabledException escape:
https://github.com/nextcloud/deck/blob/bf65da22e13a366c70c72391beaee00ed2152810/lib/Federation/DeckFederationProvider.php#L49
The OCM request handler does not know this exception. It logs it as an error and answers 400 {"message":"Internal error at https://…"}. The sender cannot tell what went wrong.
To Reproduce
- Disable Deck federation on instance B, keep it enabled on instance A.
- On instance A, share a board with a user on instance B.
- Instance A's log shows
400 Bad Request … {"message":"Internal error at …"}. Instance B logsFederationDisabledException: Federation is disabledas an error.
Expected behavior
The receiver answers with a clear reason.
Suggested fix
Convert the exception into the one the OCM handler understands, with 503, the same way federated file sharing rejects shares when it is disabled (CloudFederationProviderFiles::shareReceived()):
try {
$this->configService->ensureFederationEnabled();
} catch (FederationDisabledException $e) {
throw new ProviderCouldNotAddShareException('Deck federation is disabled on this server', '', Http::STATUS_SERVICE_UNAVAILABLE, $e);
}
A unit test can assert that no board is inserted and that the exception carries 503 and the message. I tested this change with a unit test and on the two instances below: the sender now gets 503 with this message, and the receiver no longer logs an error.
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
-
Deck treats unset files_sharing server-to-server keys as disabledCó 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 78/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