mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
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 !