Remote participant is stored even when the other server rejected the share
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 68/100
Direzione di ricerca
The bug is in BoardService::addAcl() in lib/Service/BoardService.php (around line 480), which ignores the response of sendCloudShare() and calls AclMapper::insert() regardless. Read how the CalDAV federation checks the status code in apps/dav/lib/CalDAV/Federation/FederationSharingService.php and mirror that pattern. Done means a rejected share (400, 500, unreachable, or non-201 200) throws an error without inserting the ACL, a 201 still adds the participant, and unit tests assert AclMapper::insert() is not called on failure.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When a board is shared with a federated user and the other server rejects the share, Deck still adds the remote participant to the board and the API returns 200. The participant never receives anything. The only trace is an error in the sender's nextcloud.log.
BoardService::addAcl() ignores the response of sendCloudShare() and inserts the ACL anyway:
https://github.com/nextcloud/deck/blob/bf65da22e13a366c70c72391beaee00ed2152810/lib/Service/BoardService.php#L480
To Reproduce
- Enable Deck federation on instance A.
- Share a board with a cloud ID that does not exist on instance B, for example
[email protected]. Or share with a valid user on an instance where Deck federation is disabled. - The share appears to succeed and the participant is listed on the board.
- The sender's log shows:
Error while sending share to federation server: … resulted in a 400 Bad Request response: {"message":"User \"doesnotexist\" does not exists at …"}
Expected behavior
The share fails with an error message and no participant is added.
Suggested fix
Check the response before the ACL is inserted, the way the CalDAV federation does in apps/dav/lib/CalDAV/Federation/FederationSharingService.php:
try {
$response = $this->cloudFederationProviderManager->sendCloudShare($cloudShare);
} catch (OCMProviderException $e) {
throw new BadRequestException('Could not reach the remote server to share the board');
}
if ($response->getStatusCode() !== Http::STATUS_CREATED) {
throw new BadRequestException('The remote server did not accept the board share');
}
The sharing sidebar already shows "Failed to create share with …" when the request fails. Unit tests can cover a rejected share (400, 500 and an unexpected 200), an unreachable server and an accepted share (201), and assert that AclMapper::insert() is not called on failure. I tested this change with unit tests and on the two instances below: a non-existent cloud ID and a receiver with Deck federation disabled now give 400 without a participant, and a valid share still 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.
- 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
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nextcloud/deck
Issue simili
-
area-integrations
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Trac-Systems/main_settlement_bus#1071 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug kind/bug pulumi/pulumi R1 S1
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Document that Search Attributes on Standalone Activity start are not billed as additional ActionsAperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 90/100
temporalio/documentation#5883 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue help wanted
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Stanley03-arch/Rabbit#15 ·
I maintainer di solito rispondono entro 1 giorno