Receiver with Deck federation disabled answers "Internal error"
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
修正は lib/Federation/DeckFederationProvider.php の shareReceived() に入れてください。約49行目付近で FederationDisabledException が外に漏れています。CloudFederationProviderFiles::shareReceived() が無効状態を 503 の ProviderCouldNotAddShareException にどう変換しているかを参考にしてください。完了の条件は、フェデレーションが無効な場合にボードが挿入されないことを単体テストで示し、送出される例外がステータス 503 と分かりやすいメッセージを持つことです。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- JavaScript
- スター
- 1.4k
- フォーク
- 380
- 平均マージ
- 1日 17時間
- マージ済み PR(30日)
- 72
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
nextcloud/deck#8834 · コメント 1 件 ·
メンテナーはふだん 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 日以内に返信
-
Deck treats unset files_sharing server-to-server keys as disabled対応中かも @whoalin1 が 5 日前に担当しました。 オープン0. Needs triage bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/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
flisk-sh/chat#833 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信