Receiver with Deck federation disabled answers "Internal error"
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
Línea de trabajo
La corrección debe ir en lib/Federation/DeckFederationProvider.php, en shareReceived(), donde FederationDisabledException se escapa cerca de la línea 49. Compara cómo CloudFederationProviderFiles::shareReceived() traduce un estado deshabilitado a una ProviderCouldNotAddShareException con código 503. Se considera terminado cuando una prueba unitaria demuestra que no se inserta ningún tablero si la federación está deshabilitada y que la excepción lanzada lleva el estado 503 y un mensaje claro.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.4k
- Forks
- 380
- Merge medio
- 1 d 17 h
- PR fusionados (30 d)
- 72
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nextcloud/deck
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
2 small URL BugsAbierto1. to develop bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
nextcloud/deck#8834 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Updating a card without `done` clears its done statePosiblemente ocupada @whoalin1 la tomó hace 5 días. Abierto0. Needs triage bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Updating a card on an incoming federated board without `done` returns 500Posiblemente ocupada @AlirezaAghaee1996 la tomó hace 5 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Deck treats unset files_sharing server-to-server keys as disabledPosiblemente ocupada @whoalin1 la tomó hace 5 días. Abierto0. Needs triage bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de nextcloud/deck
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
vecture-be/belgium-data-desk#181 ·
Los mantenedores suelen responder en 1 día
-
enhancement frontend reconciliation UX
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
humlab-sead/sead_shape_shifter#882 ·
Los mantenedores suelen responder en 1 día
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
erkamyaman/rust-anything#1381 ·
Los mantenedores suelen responder en 1 día
-
a11y accessibility area: i18n area: pages area: sites bug i18n priority: P2 seo tech: javascript tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
flisk-sh/chat#833 · 1 comentario ·
Los mantenedores suelen responder en 1 día