GHSA-3vjg-3p4q-8fwh. The REST card DELETE looked the card up on the board
the caller was authorised for, destroyed its checklists, checklist items,
comments, attachments and subcards by cardId, and removed the card itself
last, keyed on that board and list. A move to another board landing in
between left the card alive on a board the deleter cannot read, stripped of
every child, with both requests answering 200 (CWE-367). Every hooked
removal had the same shape: collection-hooks runs Cards.before.remove (where
the cascade was) and then removes by the caller's original selector - by
swimlane, delete batch or parent - which a moved card no longer matches. The
custom-field link clean-up did the same to the cards linked to it.
The card document is now the claim (models/lib/claimedCardRemoval.js): the
single and bulk REST deletes remove the card first and cascade only when
that removal matched, and the hooked removals cascade from Cards.after.remove
only when the card is really gone. A list deletion removes a card only while
it is still in that list. The REST board move that loses to a delete is a
404 instead of a 500 from cardMove.
A delete that lost the race, or arrived after the card was moved away from
the named board, is refused and recorded in Admin Panel / Problems as
RaceBleed (authz.card-delete-race, medium, never disables the account): a
stale view is not an attack, and PurgeBleed's critical record used to
disable the member who deleted a card somebody had just moved.
tests/claimedCardRemoval.test.cjs replays the reported race and scans
server/ for any cascade before or without the card's removal;
tests/playwright/specs/race-bleed.e2e.js races 12 moves against deletes
and checks that a surviving card always keeps its checklist.
Thanks to xingmuse and xet7 !
From a card's Custom Fields menu, "Link fields to another card" links it to
another card by a pasted card link or a title search, both ways or one way
(this card sends to a main card). Fields match by name and type; a dropdown
value is carried by its item name, a multi-select only when the other field
has every item, and fields on one card only (such as Remarks) stay there.
Linking fills only the other card's empty matching fields once.
A link is held on both cards and counts only when both sides match. Linking
needs read and edit rights on both cards; a card the user cannot read is "not
found". A carried value is written as the link's creator, recorded in
Activities and History, and only while that user may still read and edit both
cards; admin-only fields never take part. A loop guard stops echoes and rings,
with a depth limit and a write budget per change. A copied, imported or
restored card starts unlinked, a deleted card's links are removed from the
others, and a direct client write of the links is refused and trips a canary.
The new strings are in English in every locale, pending Transifex.
Thanks to MarcusDger and xet7 !
Fixes#5681.