Files
wekan/server/models
Lauri Ojansivu c355926767 REST: a new card's list and swimlane must belong to the board in the URL.
POST /api/boards/:boardId/lists/:listId/cards and its bulk sibling wrote the
URL's listId and the body's swimlaneId onto the new card without checking
either against the board. A list or swimlane id of ANOTHER board gave a
card that pointed at a list and a swimlane its own board does not have -
the #6572 shape, a card that shows on neither board - and the list
permission check was evaluated against the wrong board's rules. The PUT
route has refused this since #6572; the create routes now do the same with
a 400 that names the field, and the bulk route reports it per entry. An id
that is not a string (such as { $ne: null }) is refused rather than looked
up. The linked-card branch was already checked by createLinkedCardFor.

tests/restCardPlacement.test.cjs pins both routes and fails on any REST
handler in server/ that inserts a card without the check.

This was in CHANGELOG TODO Later as needing a maintainer decision; the PUT
route's #6572 rule already decided it.

Thanks to xet7 !
2026-10-27 21:22:49 +02:00
..
2026-06-06 02:53:58 +03:00