Receiver with Deck federation disabled answers "Internal error"
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
Direzione di ricerca
La correzione va apportata in lib/Federation/DeckFederationProvider.php, in shareReceived(), dove FederationDisabledException esce vicino alla riga 49. Confronta come CloudFederationProviderFiles::shareReceived() associa uno stato disabilitato a una ProviderCouldNotAddShareException con stato 503. È completato quando un test unitario mostra che nessuna board viene inserita se la federazione è disabilitata e che l'eccezione lanciata riporta lo stato 503 e un messaggio chiaro.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- JavaScript
- Stelle
- 1.4k
- Fork
- 380
- Merge medio
- 1g 17h
- PR unite (30g)
- 72
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nextcloud/deck
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
2 small URL BugsAperta1. to develop bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
nextcloud/deck#8834 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Updating a card without `done` clears its done stateForse già presa @whoalin1 l’ha presa 5 giorni fa. Aperta0. Needs triage bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Updating a card on an incoming federated board without `done` returns 500Forse già presa @AlirezaAghaee1996 l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Deck treats unset files_sharing server-to-server keys as disabledForse già presa @whoalin1 l’ha presa 5 giorni fa. Aperta0. Needs triage bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nextcloud/deck
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vecture-be/belgium-data-desk#181 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement frontend reconciliation UX
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
humlab-sead/sead_shape_shifter#882 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
erkamyaman/rust-anything#1381 ·
I maintainer di solito rispondono entro 1 giorno
-
a11y accessibility area: i18n area: pages area: sites bug i18n priority: P2 seo tech: javascript tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
flisk-sh/chat#833 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno