Receiver with Deck federation disabled answers "Internal error"
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
The fix belongs in lib/Federation/DeckFederationProvider.php, in shareReceived(), where FederationDisabledException escapes near line 49. Compare with how CloudFederationProviderFiles::shareReceived() maps a disabled state to a 503 ProviderCouldNotAddShareException. Done means a unit test shows no board is inserted when federation is disabled and the thrown exception carries status 503 and a clear message.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 380
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 72
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextcloud/deck
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
2 small URL BugsOpen1. to develop bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
nextcloud/deck#8834 · 1 comment ·
Maintainers usually reply within 1 day
-
Updating a card without `done` clears its done statePossibly taken @whoalin1 claimed this 5 days ago. Open0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Updating a card on an incoming federated board without `done` returns 500Possibly taken @AlirezaAghaee1996 claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Deck treats unset files_sharing server-to-server keys as disabledPossibly taken @whoalin1 claimed this 5 days ago. Open0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vecture-be/belgium-data-desk#181 ·
Maintainers usually reply within 1 day
-
enhancement frontend reconciliation UX
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
humlab-sead/sead_shape_shifter#882 ·
Maintainers usually reply within 1 day
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
erkamyaman/rust-anything#1381 ·
Maintainers usually reply within 1 day
-
a11y accessibility area: i18n area: pages area: sites bug i18n priority: P2 seo tech: javascript tests
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
flisk-sh/chat#833 · 1 comment ·
Maintainers usually reply within 1 day