Deck treats unset files_sharing server-to-server keys as disabled
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 78/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- docker, mysql, php
- Domínio
- api, authorization, backend
Direção de pesquisa
Comece em lib/Service/ConfigService.php, em ensureFederationEnabled(), onde as duas chaves files_sharing são lidas com o padrão 'no'. Altere esses padrões para 'yes' para corresponder ao FederatedShareProvider. Está concluído quando os testes unitários mostrarem que a federação passa com as duas chaves não definidas e que ainda lança uma exceção quando a federação do Deck está desativada ou quando qualquer uma das chaves é 'no'.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- JavaScript
- Estrelas
- 1.4k
- Forks
- 380
- Merge médio
- 1d 17h
- PRs com merge (30d)
- 72
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de nextcloud/deck
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
2 small URL BugsAberta1. to develop bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
nextcloud/deck#8834 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Updating a card without `done` clears its done stateTalvez já em andamento @whoalin1 assumiu há 5 dias. Aberta0. Needs triage bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia
-
Updating a card on an incoming federated board without `done` returns 500Talvez já em andamento @AlirezaAghaee1996 assumiu há 5 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
Todas as issues de nextcloud/deck
Issues semelhantes
-
area-integrations
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Trac-Systems/main_settlement_bus#1071 ·
Mantenedores costumam responder em até 1 dia
-
Bug kind/bug pulumi/pulumi R1 S1
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
Document that Search Attributes on Standalone Activity start are not billed as additional ActionsAberta
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 90/100
temporalio/documentation#5883 ·
Mantenedores costumam responder em até 1 dia
-
good first issue help wanted
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
Stanley03-arch/Rabbit#15 ·
Mantenedores costumam responder em até 1 dia