Files
wekan/server
Lauri Ojansivu b3537985eb Mark the guarded publication arguments as checked, or the audit throws.
The guard replaced `check(boardId, String)` with `Match.test(...)`, and every
subscription then failed with

  Exception from sub board id ... Error: Did not check() all arguments during
  publisher 'board'

This app runs with audit-argument-checks: a publisher that returns without having
check()ed every one of its arguments is failed by the audit, and `Match.test` is
not checking - it only asks. So the server no longer died, but no board could be
subscribed to either.

Each guarded publisher now marks its arguments with `check(x, Match.Any)` - which
satisfies the audit and cannot throw - and validates them with `Match.test`
immediately after. `board`, `boardCardsWindow` and `boardCardsLoadingMode` all do
this. Checked the other publications too: `activities` was the only other one
that looked unchecked, and it does check its argument, over several lines.

tests/publicationArgumentGuard.test.cjs now requires both halves - every argument
marked with Match.Any, and the marking before the validation - so removing the
check() again fails the suite instead of the server.

Thanks to xet7 !
2026-07-26 23:30:15 +03:00
..
2026-06-06 07:21:59 +03:00
2026-03-22 17:17:48 +02:00
2021-06-14 15:11:21 +02:00