Deck treats unset files_sharing server-to-server keys as disabled

Open Beginner friendly
#8,788 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@whoalin1 is already working on this.

Since Nov 28, 2026.

  • #8825 by @whoalin1 — open

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

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

0. Needs triage bug

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

  1. On an instance where the federated sharing settings were never changed, enable Deck federation (occ config:app:set deck federationEnabled --value=yes).
  2. Share a board with a federated user.
  3. The API returns 400 "Federation is disabled".
  4. Setting both keys explicitly to yes makes 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

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextcloud/deck

All issues in nextcloud/deck

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.