Reviewing the legacy direct Rules writes: a board admin of their own board
could save a rule that named a trigger of a board they do not administer.
Only that board's own rules run on its activities, but the matcher took a
trigger's rule from Trigger.getRule() - whichever rule named it first - so
the other board's own rule could silently stop running. The matcher now
looks up the trigger's rule on the activity's board, and a DDP insert or
update of a rule naming another board's trigger is refused and recorded in
Admin Panel / Problems under RepointBleed (no client names one: the rule
editor creates the trigger on the rule's board first).
Tests: tests/repointBleed.test.cjs (the decision for insert, $set,
$addToSet and $push, the negatives, and the matcher's source), and a server
test that, without the change, accepted the foreign rule and lost the
victim board's rule.
Thanks to xet7 !
Triggers, Actions, Rules and Integrations were allowed to a board admin of the
board the document was on BEFORE an update; nothing refused the update itself
changing boardId. Any registered user, admin of a board they created, could
move a rule trigger to '*' or unset its board - which the rule matcher matched
on every board - and have a send-email action mail them cards, comments and
attachments from every private board; or move a webhook integration onto a
private board and receive its activity, or rewrite its comments through a
two-way hook. Custom fields accepted a board list if the caller could write to
ANY board in it, so a field could be planted on (or pulled from) a board
without access; comment reactions could be moved onto another comment.
A shared deny rule now refuses any client update that changes those
documents' board, custom fields need write access on every board they are put
on or taken off, and the rule matcher runs a rule only for activity on its own
board. Refusals record RepointBleed in Admin Panel -> Problems (high: no client
changes these fields). Unit, negative (every board-owned permissions file) and
browser tests.
Thanks to xet7 !