Deck treats unset files_sharing server-to-server keys as disabled
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- docker, mysql, php
- Domain
- api, authorization, backend
Research direction
Start in lib/Service/ConfigService.php, in ensureFederationEnabled(), where both files_sharing keys are read with a default of 'no'. Change those defaults to 'yes' to match FederatedShareProvider. Done when unit tests show federation passes with both keys unset, and still throws when Deck federation is off or either key is 'no'.
Written by the indexing model from the issue text.
Description
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.
- 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
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/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