Compare commits

...
45 Commits
Author SHA1 Message Date
github-actions[bot] 5be568495e Bump versions for v13.14 2026-11-16 21:13:02 +00:00
Lauri Ojansivu ebcdf327b0 Prepare v13.14 release 2026-11-16 23:12:07 +02:00
Lauri Ojansivu e3da773d03 Shared list headers guard expects the !important hiding rule.
The #2805 guard still pinned a plain `display: none`, which the #6902 fix
made `!important` because the desktop list header's
`display: block !important` overrode it. The guard now says why.

Thanks to xet7 !
2026-11-16 20:19:19 +02:00
Lauri Ojansivu b35184d487 VSCodium sandbox: allow the host's Docker through flatpak-spawn --host.
vscodium-sandbox.sh now grants --talk-name=org.freedesktop.Flatpak, so
build.sh's docker_exec can run Playwright Firefox and WebKit in the
official Playwright image when they cannot start inside the sandbox.
WEKAN_SANDBOX_HOST_DOCKER=0 leaves the grant out. The README says what it
costs: flatpak-spawn --host is a host escape and the Docker socket is
root-equivalent. The script gets a bash shebang, as it now uses an array.

Thanks to xet7 !
2026-11-16 20:10:25 +02:00
Lauri Ojansivu db3b12fac2 Merge remote-tracking branch 'origin/main' 2026-11-16 20:07:31 +02:00
Lauri Ojansivu a34beaa62b Updated ChangeLog.
Thanks to xet7 !
2026-11-16 16:46:36 +02:00
Lauri Ojansivu 138f727ebb Card shortcuts open only their popup.
d, Shift+M and Shift+C on a hovered or selected minicard opened the card
first, and Shift+M / Shift+C then opened the card's hamburger menu and
clicked its item: card, menu and popup for one key. Now the Due date, Move
card or Copy card popup opens by itself next to the minicard, as a click on
a minicard's date or label opens only its popup, and the card stays closed.
On an opened card Move / Copy open next to its hamburger without showing the
menu; d there still clicks the card's own Due date control.

The popup is opened directly, so client/lib/cardShortcutPopup.js applies the
conditions the controls a click would use are rendered under: the board
allows due dates and the user may modify the card (a Worker only edits an
existing date), Move card for a board admin, Copy card for a member who is
not a Worker, both only with cardMenuWrites. Without them nothing opens.
tests/cardShortcutPopup.test.cjs drives the rules and ties each one to its
template condition; the browser specs check the card stays closed and no
menu is shown, and that a non-admin and disabled shortcuts open nothing.
The help-list check matched "Move Card to Archive" too and now matches the
action text exactly.

Thanks to mimZD and xet7 !

Fixes #6924.
2026-11-16 16:46:06 +02:00
Lauri Ojansivu 39ee1d9512 One shared list header row hides the other swimlanes' list headers.
The rule hiding them was `display: none`, and the desktop list header layout
sets `display: block !important` (lists/list.css, boardHeader.css); a plain
declaration loses to an !important one, so every swimlane kept its headers
and tests/playwright/specs/shared-list-row-6902.e2e.js failed. The rule is
!important now, and its selector outranks those. tests/sharedListRow6902.test.cjs
finds every !important display rule on a .list-header in the client CSS and
requires the hiding rule to outrank it (verified to fail on the old rule).

Thanks to mimZD and xet7 !
2026-11-16 16:46:06 +02:00
Lauri Ojansivu b05972c4c8 A checklist folded on a minicard stays folded: no publication sends the current user a partial profile.
The fold was stored, and half a second later the checklist unfolded again.
DDP merges only top-level fields, and Meteor re-runs named subscriptions
before the accounts publication of the whole profile on every login, a
reconnect included. userDesktopDragHandles sent the current user
{ profile: { showDesktopDragHandles } }, and user-miniprofile, user-search,
notificationUsers, the card search and report, the boards report, People,
the impersonation report and the Chat view's comment authors sent a few
profile.* fields that could include the current user. When one of them won,
the client's profile shrank to those fields until a reload, and every
preference in it went back to its default; #6691 had found the same for the
board view and fixed only that one.

userDesktopDragHandles now publishes the preference under its own top-level
field, as userBoardView does, and utils.js reads it when the profile has
none. Every other publication leaves the current user out
(server/lib/notCurrentUser.js); their own document is published in full
already, and user-admin now also publishes createdAt, loginDisabled,
lastConnectionDate and importUsernames for the user's own row on the admin
pages.

tests/noNarrowProfileForCurrentUser6919.test.cjs finds every users query
with profile subfields in a server file that publishes and requires it to
leave the current user out (verified to fail when one does not).
tests/playwright/specs/minicard-checklist-collapse-6919.e2e.js folds and
unfolds a minicard checklist in Persian after a page load and after a
reconnect, on the reporter's card, a second checklist, a linked card, a user
with 300 earlier folds and both swimlanes of a shared list header row, and
checks the fold survives the server's answer, in the database and on the
client. Before the fix 4 of 24 reconnect runs unfolded; with it 24 of 24 and
the whole spec pass in Chromium.

Thanks to mimZD and xet7 !

Fixes #6919.
2026-11-16 16:46:06 +02:00
Lauri Ojansivu 495a6faa63 Source test mode starts again: meteor/<package>/main resolves.
build.sh's source test mode (scripts/dev-source) stopped at startup with
"Cannot find module 'meteor/aldeed:collection2/main'". server/main.js loads
collection2's main module before the models (2699f4deea), and the source
runtime resolved only a bare meteor/<package>. It now maps
meteor/<package>/main to the same package exports, which image.load has
already run. tests/devSourceMainModule.test.cjs checks every such import in
the server entry resolves, and that other sub-paths are not taken for it.

Thanks to xet7 !
2026-11-16 16:46:06 +02:00
Lauri Ojansivu 8eff8bb442 Merge pull request #6922 from AhmedLukman/codex/fix-dropdown-option-rename
Fix REST dropdown option renaming
2026-11-16 15:21:52 +02:00
Ahmed Lukman 00b0431685 Fix REST dropdown option renaming
Use an explicit array index when renaming a dropdown option so schema
validation and protected-field checks can preview the update. Match the
option ID at that index to avoid renaming a sibling after a concurrent
removal or reorder, and return 404 when the update no longer matches.

Add handler and browser regressions for persisted names, stable selections,
encoded IDs, missing targets, authorization and protected-field restrictions.

Thanks to AhmedLukman and xet7 !
2026-11-16 15:11:51 +03:00
Lauri Ojansivu a364e75025 Updated ChangeLog.
Thanks to xet7 !
2026-11-16 13:58:38 +02:00
Lauri Ojansivu 040d853c8e RedirectBleed hardening: a direct client write of an avatar URL follows setAvatarUrl's rule.
setAvatarUrl refuses javascript:, file:, data:text/html and every scheme but
http(s), data:image and local paths, but the Users allow rule permits every
profile.* field, so Users.update({$set: {'profile.avatarUrl': ...}}) from the
browser console stored what the method refuses. Not exploitable as reported:
the URL is rendered only as an <img src>, and the server fetches it only
through fetchSafe (http/https). The rule is now models/lib/avatarUrlScheme.js,
used by both avatar methods and by a Users deny rule, which logs the refused
write to Admin Panel / Problems as file.avatar-url. No WeKan client code
writes the field directly, which the test checks.

Verified while checking meifukun's GHSA-g98f-44gc-hqcc, GHSA-x6fh-wrr5-3426,
GHSA-28hr-j65r-grj2, GHSA-mrhx-8xm7-chrq and GHSA-83qj-w8mp-w4qf against the
current code: all five were already fixed (tests/securityMeifukun.test.cjs).

Thanks to meifukun and xet7 !
2026-11-16 13:54:08 +02:00
Lauri Ojansivu 79676b3790 Description editor shows no placeholder text instead of "comment-placeholder".
i18next 27 (#6915, shipped in v13.13) changed returnEmptyString to default
false, so an empty translation falls back like a missing one, to its key.
en.i18n.json keeps comment-placeholder and eight Blockly suffixes empty on
purpose, so the description and comment editors showed the text
"comment-placeholder". TAPi18n.init() now sets returnEmptyString: true, which
is the v26 behaviour; no language has an empty value where English has text,
so nothing that should fall back to English goes blank.

lld, lb, haw and sc had text for the empty English source ("Optioun: ",
"Ma ka ʻōlelo Hawaiʻi: "), which is not a translation of anything; they are
empty now like every other language.

tests/i18nEmptyString.test.cjs runs the real __() with the init() options
read from tap.js (verified to fail without the fix on i18next 27.1.1), and
checks no language has a blank value where English has text. The mocha suite
and the description Playwright spec check the placeholder is empty.

Thanks to brlin-tw and xet7 !

Fixes #6921.
2026-11-16 13:47:58 +02:00
Lauri Ojansivu 5ec3aaf85f Guard follows the merged dependabot update: freebsd-vm 1.6.0.
Dependabot moved bsd.yml's FreeBSD VM to v1.6.0 (#6907), and
tests/bsdBundles.test.cjs requires the same commit as node-patches, which
builds node-freebsd-x64 in that VM. node-patches now uses v1.6.0 too, so the
guard pins its new commit.

Thanks to xet7 !
2026-11-16 13:43:18 +02:00
Lauri Ojansivu cc302acdd1 Merge pull request #6920 from AhmedLukman/codex/fix-card-attachment-cascade
Soft-delete attachments when removing their card
2026-11-16 13:32:22 +02:00
Lauri Ojansivu 77c22918d7 Merge pull request #6918 from AhmedLukman/codex/fix-attachment-rename-validation
Keep renamed upload paths consistent before validation
2026-11-16 13:31:46 +02:00
Ahmed Lukman 1051265fc8 Cover attachment cleanup through the card delete menu
Upload attachments through the browser and delete their card through More,
Delete and its confirmation. Verify the persisted deletion markers, history,
active attachment list, recoverable bytes and the sibling card's display.

Thanks to AhmedLukman and xet7 !
2026-11-15 20:27:38 +03:00
Ahmed Lukman 7875220470 Soft-delete attachments when removing their card
Find live attachments by their metadata card ID and use the existing
attachment deletion lifecycle. Preserve recoverable bytes and history while
removing the files from active attachment listings.

Cover single and bulk REST deletion, rejected requests, existing soft-deleted
files, history, byte preservation and the remaining card's browser display.

Thanks to AhmedLukman and xet7 !
2026-11-15 20:02:43 +03:00
Ahmed Lukman 628a69c086 Keep renamed upload paths consistent before validation
Update the original and version paths in memory and in the file record, and wait for metadata writes before upload hooks continue. Cover rename failures, persistence ordering, normalized uploads, original bytes and card rendering.
2026-11-15 14:11:10 +03:00
github-actions[bot] ac39a9a6b0 Bump versions for v13.13 2026-11-15 01:36:09 +00:00
Lauri Ojansivu 59d3fc9690 Prepare v13.13 release 2026-11-15 03:35:08 +02:00
Lauri Ojansivu 9e970b87fa Updated ChangeLog.
Thanks to ChrisMagnuson, dependabot and xet7 !
2026-11-15 03:11:44 +02:00
Lauri Ojansivu e46d7a2376 Destination pickers list the cards of a lazily loaded board.
Copy Checklist's card dropdown stayed empty for a board with more cards
than the lazy-loading threshold (CARDS_LOADING=auto above 500, or lazy).
The pickers read the chosen board's cards from the `board` publication,
which ships no cards for a lazy board, and a picker opens no list that
would fetch its window. A new `destinationCards` publication ships the
titles and places of one list's cards in one swimlane (or of the whole
board for the parent-card picker), whatever the card-loading mode, scoped
like the other card publications: the board must be readable, and an
assigned-only member gets only their own cards.

Copy / Move checklist, Copy checklist from a template card, Move / Copy
card, Link card and the parent-card picker subscribe to it. Done waits
until the chosen list's cards are there, a remembered card is checked
against them rather than against the board, and the open board's Filter
no longer empties the destination list.

Thanks to ChrisMagnuson and xet7 !

Fixes #6917.
2026-11-15 03:11:14 +02:00
Lauri Ojansivu c05be372aa Merge pull request #6914 from wekan/dependabot/npm_and_yarn/mongodb-7.8.0
Bump mongodb from 7.7.0 to 7.8.0
2026-11-15 01:48:01 +02:00
dependabot[bot] 7377f88aca Bump mongodb from 7.7.0 to 7.8.0
Bumps [mongodb](https://github.com/mongodb/node-mongodb-native) from 7.7.0 to 7.8.0.
- [Release notes](https://github.com/mongodb/node-mongodb-native/releases)
- [Changelog](https://github.com/mongodb/node-mongodb-native/blob/main/HISTORY.md)
- [Commits](https://github.com/mongodb/node-mongodb-native/compare/v7.7.0...v7.8.0)

---
updated-dependencies:
- dependency-name: mongodb
  dependency-version: 7.8.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-14 23:46:20 +00:00
Lauri Ojansivu 22577312a9 Merge pull request #6916 from wekan/dependabot/npm_and_yarn/sanitize-html-2.18.2
Bump sanitize-html from 2.18.1 to 2.18.2
2026-11-15 01:45:52 +02:00
Lauri Ojansivu b523e4a517 Merge pull request #6915 from wekan/dependabot/npm_and_yarn/i18next-27.1.1
Bump i18next from 26.5.11 to 27.1.1
2026-11-15 01:45:26 +02:00
Lauri Ojansivu 1810796dc6 Merge pull request #6913 from wekan/dependabot/npm_and_yarn/typescript-eslint/parser-8.72.2
Bump @typescript-eslint/parser from 8.72.1 to 8.72.2
2026-11-15 01:44:42 +02:00
Lauri Ojansivu 8cc5567649 Merge pull request #6912 from wekan/dependabot/github_actions/softprops/action-gh-release-3.0.4
Bump softprops/action-gh-release from 3.0.3 to 3.0.4
2026-11-15 01:44:27 +02:00
Lauri Ojansivu 3d96445be8 Merge pull request #6911 from wekan/dependabot/npm_and_yarn/tests/playwright/playwright/test-1.65.0
Bump @playwright/test from 1.64.1 to 1.65.0 in /tests/playwright
2026-11-15 01:44:08 +02:00
Lauri Ojansivu 26578fcc4e Merge pull request #6910 from wekan/dependabot/github_actions/docker/login-action-4.8.0
Bump docker/login-action from 4.7.0 to 4.8.0
2026-11-15 01:43:48 +02:00
Lauri Ojansivu 8cac055c59 Merge pull request #6909 from wekan/dependabot/npm_and_yarn/puppeteer-25.17.0
Bump puppeteer from 25.15.0 to 25.17.0
2026-11-15 01:43:28 +02:00
Lauri Ojansivu 30d6826564 Merge pull request #6908 from wekan/dependabot/github_actions/azure/setup-helm-5.1.0
Bump azure/setup-helm from 5.0.1 to 5.1.0
2026-11-15 01:42:56 +02:00
Lauri Ojansivu b32234cc9c Merge pull request #6907 from wekan/dependabot/github_actions/vmactions/freebsd-vm-1.6.0
Bump vmactions/freebsd-vm from 1.5.9 to 1.6.0
2026-11-15 01:42:27 +02:00
dependabot[bot] 8b213d38c9 Bump sanitize-html from 2.18.1 to 2.18.2
Bumps [sanitize-html](https://github.com/apostrophecms/apostrophe/tree/HEAD/packages/sanitize-html) from 2.18.1 to 2.18.2.
- [Changelog](https://github.com/apostrophecms/apostrophe/blob/sanitize-html@2.18.2/packages/sanitize-html/CHANGELOG.md)
- [Commits](https://github.com/apostrophecms/apostrophe/commits/sanitize-html@2.18.2/packages/sanitize-html)

---
updated-dependencies:
- dependency-name: sanitize-html
  dependency-version: 2.18.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-14 20:33:27 +00:00
dependabot[bot] 74b004333b Bump i18next from 26.5.11 to 27.1.1
Bumps [i18next](https://github.com/i18next/i18next) from 26.5.11 to 27.1.1.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v26.5.11...v27.1.1)

---
updated-dependencies:
- dependency-name: i18next
  dependency-version: 27.1.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-14 20:33:17 +00:00
dependabot[bot] f04beb1622 Bump @typescript-eslint/parser from 8.72.1 to 8.72.2
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.72.1 to 8.72.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.72.2/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.72.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-14 20:33:02 +00:00
dependabot[bot] f9b52fbd9d Bump softprops/action-gh-release from 3.0.3 to 3.0.4
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 3.0.3 to 3.0.4.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/efb35369e0ad2afab669f228072c1b0d510eae64...8a0cd651e5b2365bd640854a3fa5dfc70e4875f3)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 3.0.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-14 20:33:00 +00:00
dependabot[bot] 74b1df33d1 Bump @playwright/test from 1.64.1 to 1.65.0 in /tests/playwright
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.64.1 to 1.65.0.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.64.1...v1.65.0)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-version: 1.65.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-14 20:32:55 +00:00
dependabot[bot] fa8303dbe4 Bump docker/login-action from 4.7.0 to 4.8.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.7.0 to 4.8.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/81c6f93d4bc991e510b342a00b419b3bb4efc5c6...8aa5831fb8d48d8f76594c7ddde61ae58019f550)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-14 20:32:52 +00:00
dependabot[bot] 5346efb843 Bump puppeteer from 25.15.0 to 25.17.0
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 25.15.0 to 25.17.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v25.15.0...puppeteer-v25.17.0)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-version: 25.17.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-14 20:32:49 +00:00
dependabot[bot] 164809e08b Bump azure/setup-helm from 5.0.1 to 5.1.0
Bumps [azure/setup-helm](https://github.com/azure/setup-helm) from 5.0.1 to 5.1.0.
- [Release notes](https://github.com/azure/setup-helm/releases)
- [Changelog](https://github.com/Azure/setup-helm/blob/main/CHANGELOG.md)
- [Commits](https://github.com/azure/setup-helm/compare/9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310...2f5e7bc67f1f9972ab16657bb795f36d8f04de0e)

---
updated-dependencies:
- dependency-name: azure/setup-helm
  dependency-version: 5.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-14 20:32:45 +00:00
dependabot[bot] ae6ee35bdb Bump vmactions/freebsd-vm from 1.5.9 to 1.6.0
Bumps [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm) from 1.5.9 to 1.6.0.
- [Release notes](https://github.com/vmactions/freebsd-vm/releases)
- [Commits](https://github.com/vmactions/freebsd-vm/compare/c46abacb49f09938ca4e1702d15d836285d694cc...811efaaac0668df8bfb8308c3ec997b5ab50037b)

---
updated-dependencies:
- dependency-name: vmactions/freebsd-vm
  dependency-version: 1.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-14 20:32:39 +00:00
84 changed files with 3236 additions and 686 deletions

No files matched your search

+1 -1
View File
@@ -147,7 +147,7 @@ jobs:
- name: Build and start in FreeBSD
if: steps.node.outputs.skip != 'true' && matrix.os == 'freebsd'
uses: vmactions/freebsd-vm@c46abacb49f09938ca4e1702d15d836285d694cc
uses: vmactions/freebsd-vm@811efaaac0668df8bfb8308c3ec997b5ab50037b
with:
release: ${{ matrix.release }}
arch: ${{ matrix.vm_arch }}
+1 -1
View File
@@ -237,7 +237,7 @@ jobs:
bash releases/bun/build-target.sh'
- name: FreeBSD VM build and smoke tests
if: matrix.kind == 'freebsd'
uses: vmactions/freebsd-vm@c46abacb49f09938ca4e1702d15d836285d694cc # v1.5.9
uses: vmactions/freebsd-vm@811efaaac0668df8bfb8308c3ec997b5ab50037b # v1.6.0
with:
release: '14.5'
arch: ${{ matrix.vm_arch }}
+1 -1
View File
@@ -72,7 +72,7 @@ jobs:
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
+1 -1
View File
@@ -486,7 +486,7 @@ jobs:
- name: Install Helm
if: steps.check.outputs.skip != 'true'
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
uses: azure/setup-helm@2f5e7bc67f1f9972ab16657bb795f36d8f04de0e # v5.1.0
- name: Publish the chart for this release
if: steps.check.outputs.skip != 'true'
+2 -2
View File
@@ -538,7 +538,7 @@ jobs:
path: charts
- name: Install Helm
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
uses: azure/setup-helm@2f5e7bc67f1f9972ab16657bb795f36d8f04de0e # v5.1.0
- name: Fetch gh-pages branch (release-charts.sh switches to it)
run: |
@@ -1220,7 +1220,7 @@ jobs:
# loudly and verified from the release side; the next step checks the two
# base bundles from here.
- name: Create GitHub Release
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
uses: softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3.0.4
with:
tag_name: v${{ needs.prepare.outputs.version }}
name: v${{ needs.prepare.outputs.version }}
+222 -449
View File
@@ -124,6 +124,228 @@ its reason.
</details>
# v13.14 2026-11-16 WeKan ® release
**In short:** a **checklist folded on a minicard** stays folded, and every
profile preference survives a reconnect. The **card shortcuts** open only their
popup, **one shared list header row** really hides the other swimlanes'
headers, and the editors no longer show "comment-placeholder" after the
**i18next 27** update. **Deleting a card** keeps its attachments recoverable.
This release fixes the following bugs:
**Minicards** - folding a checklist, and the preferences it is stored with.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/b05972c4c88e108526c85ad3598867d781395e98">A checklist folded on a minicard stays folded: no publication sends the current user a partial profile</a>. Thanks to mimZD and xet7.</summary>
The fold was stored, and half a second later the checklist unfolded again
([#6919](https://github.com/wekan/wekan/issues/6919)). DDP merges only
top-level fields, and Meteor re-runs named subscriptions before the accounts
publication of the whole profile on every login, a reconnect included.
`userDesktopDragHandles` and ten other publications sent the current user a
few `profile` fields; when one won, the client's profile shrank to them until a
reload and every preference in it went back to its default -
[#6691](https://github.com/wekan/wekan/issues/6691) had found the same for the
board view. The drag-handle preference is now published under its own field,
and the others leave the current user out (`server/lib/notCurrentUser.js`).
`tests/noNarrowProfileForCurrentUser6919.test.cjs` finds every such query; the
browser spec folds checklists in Persian after a page load and a reconnect, and
24 of 24 reconnect runs pass where 4 of 24 unfolded before.
</details>
**Keyboard shortcuts** - what `d`, Shift+M and Shift+C open.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/138f727ebbfc30d395fbcfa18ca244e58abe91d7">Card shortcuts open only their popup, next to the minicard or the card menu</a>. Thanks to mimZD and xet7.</summary>
On a hovered minicard, `d`, Shift+M and Shift+C opened the card first, and
Move / Copy went through the card's hamburger menu as well
([#6924](https://github.com/wekan/wekan/issues/6924)). Now only the Due date,
Move card or Copy card popup opens, next to the minicard, and the card stays
closed; on an opened card Move / Copy no longer show the menu first.
`client/lib/cardShortcutPopup.js` allows exactly what a click on the rendered
control would, and `tests/cardShortcutPopup.test.cjs` ties each rule to that
template condition; the browser specs check a non-admin and disabled shortcuts
open nothing.
</details>
**Swimlanes** - one shared list header row.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/39ee1d9512ef0c5c5aec94fe9842c00c7b00da1d">One shared list header row hides the other swimlanes' list headers</a>. Thanks to mimZD and xet7.</summary>
The hiding rule was a plain `display: none`, which loses to the desktop list
header layout's `display: block !important`, so every swimlane kept its headers
and the setting's own browser spec failed. It is `!important` now and outranks
those rules; `tests/sharedListRow6902.test.cjs` checks that against every
`!important` header display rule in the client CSS.
</details>
**Translations** - what a string that is empty on purpose shows.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/79676b3790e4b69fc43e61dcd4379eabe389fae0">An empty translation shows nothing, not its key: no "comment-placeholder" in the editor</a>. Thanks to brlin-tw and xet7.</summary>
i18next 27 ([#6915](https://github.com/wekan/wekan/pull/6915), in v13.13)
changed `returnEmptyString` to default false, so an empty translation falls
back like a missing one - and since the English value is empty too, to its
key. v13.13's notes said it would fall back to English; that was wrong. The
description and comment editors showed the text "comment-placeholder"
([#6921](https://github.com/wekan/wekan/issues/6921)), and eight Blockly
suffixes showed their keys. `TAPi18n.init()` sets `returnEmptyString: true`
again; no language has an empty value where English has text, so nothing that
should fall back to English goes blank. lld, lb, haw and sc had text for the
empty English source and are empty like the other languages.
`tests/i18nEmptyString.test.cjs` runs the real `__()` with the options read
from `tap.js`, and fails without the fix on i18next 27.1.1; the mocha suite and
the description editor's Playwright spec check the placeholder is empty.
</details>
**Attachments** - what happens to the files when a card is deleted or an upload
is renamed.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/7875220470de22f8ca5e5488ed58fe4b1c00f11d">Deleting a card soft-deletes its attachments, so they and their history can be restored</a>. Thanks to AhmedLukman and xet7.</summary>
Removing a card looked for attachments by a top-level `cardId`, which normal
attachments do not have - they keep it in `meta.cardId` - so they stayed in
the active listings. They now go through the same recoverable deletion as the
attachment menu and the API: the bytes stay, the history row and the
deleteAttachment activity are written, and the files leave the active lists.
Legacy records with a top-level `cardId` keep the hard purge.
`tests/cardAttachmentCascade.test.cjs` covers single and bulk REST deletion,
refused requests and already deleted files.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/1051265fc893fe11abb3d5f447387b560f5ea98a">A browser test deletes a card with attachments through More, Delete and its confirmation</a>. Thanks to AhmedLukman and xet7.</summary>
`tests/playwright/specs/rest-card-attachment-cascade.e2e.js` uploads
attachments in the browser, deletes their card from the card menu and checks
the deletion markers, the history, the active list, the kept bytes and the
other card's attachments.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/628a69c0861c20fbcb612b182ef70b7899b739fa">A renamed upload keeps its file paths consistent before it is validated</a>. Thanks to AhmedLukman and xet7.</summary>
When an upload's name was corrected to match its real file type, the paths
were written to the database without waiting, and the in-memory file object
kept the old ones, so the next write could put the old path back and the
validator read a path that no longer existed. `rename()` now updates the
original and version paths in memory and in the record, including the
top-level path the validator reads, and the upload hooks and the
file-extension migration wait for it. `tests/attachmentRenamePaths.test.cjs`
and `attachment-upload-rename.e2e.js` cover failures, ordering, the original
bytes and the card display.
</details>
and hardens the following security check:
<details>
<summary><a href="https://github.com/wekan/wekan/commit/040d853c8e7c0092db264527497a7dd8878dc248">RedirectBleed: a direct client write of an avatar URL follows the avatar dialog's rule</a>. Thanks to meifukun and xet7.</summary>
meifukun's five reports from July, fixed then
([RedirectBleed](https://wekan.fi/hall-of-fame/redirectbleed/),
[SourceBleed](https://wekan.fi/hall-of-fame/sourcebleed/),
[LiveBleed](https://wekan.fi/hall-of-fame/livebleed/),
[CasRaceBleed](https://wekan.fi/hall-of-fame/casbleed/),
[MetricsBleed](https://wekan.fi/hall-of-fame/metricsbleed/)), arrived as
GitHub security advisories and were checked again against the current code:
all five are fixed, and `tests/securityMeifukun.test.cjs` pins each. One gap
was found: `setAvatarUrl` refuses `javascript:`, `file:` and the rest, but the
Users allow rule permits every `profile.*` field, so a browser-console
`Users.update` stored what the method refuses. It was not exploitable - the
URL is shown only as an image and fetched only through `fetchSafe` - but the
rule is now `models/lib/avatarUrlScheme.js`, shared by both avatar methods and
a Users deny rule that records the refused write in Admin Panel / Problems.
`tests/avatarUrlDirectWrite.test.cjs` covers every way to write the field and
checks no client code writes it directly.
</details>
and has the following developer-facing fixes:
- [The FreeBSD bundle guard follows dependabot's freebsd-vm 1.6.0, which node-patches now uses too](https://github.com/wekan/wekan/commit/5ec3aaf85f4edb605a7180593486c5edd24ac713).
Thanks to xet7.
- [build.sh's source test mode starts again: meteor/package/main imports resolve](https://github.com/wekan/wekan/commit/495a6faa634841f5fbb50fc1dd535d42f1c57a52).
Thanks to xet7.
Thanks to above GitHub users for their contributions and translators for their translations.
# v13.13 2026-11-15 WeKan ® release
**In short:** **Copy Checklist** and the other destination pickers list the
cards of a large board again: a board that loads its cards lazily used to leave
the card dropdown empty. Dependabot's updates, among them **i18next 27** and
the **mongodb** driver 7.8.0, are kept.
This release fixes the following bugs:
**Destination pickers** - choosing a card on another board, whatever that
board's size.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/e46d7a2376ebfa413cec15843d8b7fc374fe63e0">The card dropdown lists the cards of a board that loads lazily</a>. Thanks to ChrisMagnuson and xet7.</summary>
Copy Checklist's card dropdown stayed empty for a board with more cards than
the lazy-loading threshold (Card loading `auto` above 500 cards, or `lazy`),
however long one waited ([#6917](https://github.com/wekan/wekan/issues/6917)).
The pickers read the chosen board's cards from the `board` publication, which
ships no cards for a lazy board, and a picker opens no list that would fetch
its own window. A new `destinationCards` publication ships the titles and
places of one list's cards in one swimlane, or of the whole board for the
parent-card picker, whatever the card-loading mode. It is scoped like the
other card publications: the board must be readable, and an assigned-only
member gets only the cards assigned to them.
Copy / Move checklist, Copy checklist from a template card, Move / Copy card,
Link card and the parent-card picker use it. Done waits until the chosen
list's cards are there, a remembered card is checked against them rather than
against the board, and the open board's Filter no longer empties the
destination list. `tests/destinationCards6917.test.cjs` runs the publication
on a 1,144-card board, an assigned-only member, an unreadable board and bad
arguments, and the dialog with a lazy destination;
`tests/playwright/specs/copy-checklist-lazy-destination.e2e.js` copies a
checklist to such a board.
</details>
and updates the following dependencies:
- **mongodb 7.7.0 → 7.8.0** — the server's database driver
([#6914](https://github.com/wekan/wekan/pull/6914)).
- **i18next 26.5.11 → 27.1.1** — translations
([#6915](https://github.com/wekan/wekan/pull/6915)). 27 changes defaults
WeKan does not rely on: it sets `fallbackLng` and `cleanCode` itself, turns
escaping off and registers sprintf on its own instance. An empty translation
now falls back to English instead of showing nothing.
- **sanitize-html 2.18.1 → 2.18.2** — HTML sanitizing
([#6916](https://github.com/wekan/wekan/pull/6916)).
- **puppeteer 25.15.0 → 25.17.0** and **@typescript-eslint/parser 8.72.1 →
8.72.2** — tooling ([#6909](https://github.com/wekan/wekan/pull/6909),
[#6913](https://github.com/wekan/wekan/pull/6913)).
- **@playwright/test 1.64.1 → 1.65.0** in tests/playwright — the browser tests
([#6911](https://github.com/wekan/wekan/pull/6911)).
- **softprops/action-gh-release 3.0.3 → 3.0.4**, **docker/login-action 4.7.0
→ 4.8.0**, **azure/setup-helm 5.0.1 → 5.1.0** and **vmactions/freebsd-vm
1.5.9 → 1.6.0** — CI ([#6912](https://github.com/wekan/wekan/pull/6912),
[#6910](https://github.com/wekan/wekan/pull/6910),
[#6908](https://github.com/wekan/wekan/pull/6908),
[#6907](https://github.com/wekan/wekan/pull/6907)).
Thanks to dependabot.
Thanks to above GitHub users for their contributions and translators for their translations.
# v13.12 2026-11-14 WeKan ® release
**In short:** WeKan is updated to **Meteor 3.6.1**, whose DDP server refuses
@@ -8227,452 +8449,3 @@ and has the following developer-tooling fix:
site admin's internal hosts are not fetchSafe's. Thanks to xet7.
Thanks to above GitHub users for their contributions and translators for their translations.
# v12.44 2026-10-14 WeKan ® release
**In short:** sign in with a **passkey** or **SQRL**, and **log out
everywhere**. **Browser push**, an **activity feed** and **ntfy** bring
notifications anywhere, and webhooks **direct-message** on **Mattermost**. Card
descriptions are **edited together, live**; cards can be **drawn on**, be
**Stories** or **Tasks**, and mark **unread changes**. Boards get **column
sets**, **linked lists** and a **Table view** that adds and drags cards, and
**All Boards** gives each team a tab. **Nextcloud** gets **CalDAV** sync and
**WebDAV** storage, public boards join the **fediverse**, and two **CodeQL**
alerts are fixed.
This release fixes the following SECURITY ISSUES found by GitHub CodeQL code scanning:
<details>
<summary><a href="https://github.com/wekan/wekan/commit/587efab82b">Two CodeQL alerts in a test, and every test pattern of the same shapes</a>. Thanks to GitHub CodeQL and xet7.</summary>
CodeQL alerts #584 (bad HTML filtering regexp) and #585 (incomplete regular
expression for hostnames), both in `tests/accountEmailHtml.test.cjs`: it
checked that the e-mail layout escapes markup with `/<img|<script|<b>/`, which
a `<SCRIPT>` passes, and made the reset address into a RegExp. It now lists
every tag of the output in any letter case and allows only the layout's own
`div`, `p`, `a` and `br`, and compares the address as text. The renderer was
already escaping them.
Both are pinned as shapes across the tree in
`tests/securityAlerts20261012.test.cjs`, which found more: a case-sensitive
`<script>` pattern in `jsWebLabels.test.cjs`, a path spliced into generated
code in `singleFile.test.cjs`, and twelve test patterns with a host name's dot
unescaped. These are in tests, so there is no attempt at runtime to record in
Admin Panel → Problems.
</details>
and adds the following new features:
**Sign-in** - how members sign in and out, and who is told.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/63ef900d56">Passkey login, and Log out everywhere</a>. Thanks to xet7.</summary>
Member Settings / Passkeys adds a passkey on this device under a name and
removes one; the sign-in page has "Sign in with a passkey", with no user name
needed. Verification is @simplewebauthn/server (pinned) against ROOT_URL's host
and origin, with a single-use challenge that expires in five minutes and a
signature counter that must move forward. Passkeys are never published. Log out
everywhere ends every session of the account, this one too.
`tests/passkeys.test.cjs` signs with a software authenticator and refuses
another key, origin, challenge or a counter that went back; a Meteor runtime
test checks the server loads. [Passkeys](docs/Features/Login/Passkeys.md).
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/ea256dd772">A login and registration webhook in the Admin Panel, off by default</a>. Thanks to KrunalDholakiya and xet7.</summary>
Admin Panel / Settings / Global Webhooks tells one address when somebody logs
in or an account is made, only for the ticked events. It carries the event,
the user name and the time; the email, IP address, full name and sign-in
method only when ticked. It is sent after the login, through the SSRF guard,
and is never published. `tests/accountWebhook.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/c940b3e301">Sign in with SQRL, from a phone or a computer</a>. Thanks to xet7.</summary>
[SQRL](https://www.grc.com/sqrl/sqrl.htm) signs in with a SQRL app or client
instead of a password, after a site admin turns it on (Admin Panel → Settings →
Visibility → Features, off by default). A member adds their identity once in
Member Settings → SQRL; the sign-in page then shows a `sqrl://` link and its QR
code and signs in by itself when the client has answered. WeKan keeps only the
identity's public keys, never published and not writable from the client.
Every nut is random and used once, each request must carry the server's
previous reply unchanged, and every request is checked with Ed25519 (Node.js's
own `crypto`). An unknown identity can neither make an account nor sign in;
disable, enable, remove and rekey follow the protocol, the last three only
with the rescue code's unlock key. `tests/sqrl.test.cjs` drives the real
handler with a software SQRL client, forged signatures, replays and altered
replies included, and `server/lib/tests/sqrl.tests.js` adds an identity and
signs in through the running server. Documented in
[SQRL.md](docs/Features/Login/SQRL.md).
</details>
**Notifications** - where they arrive and how they look.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/d873af70e8">ntfy phone notifications, per member</a>. Thanks to xet7.</summary>
Member Settings / Notification Settings takes a member's ntfy topic address
and token; each notification they get also arrives in the ntfy app, with a tap
opening the card. JSON publishing, through the SSRF guard, best effort, and the
topic is never published. `tests/ntfy.test.cjs`,
[ntfy](docs/Features/Notifications/ntfy.md).
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/058677e078">E-mails in the clear HTML layout by default</a>. Thanks to Meeques and xet7.</summary>
Notification e-mail defaults to the clearly arranged layout of \#5171, classic
one choice away; account e-mails (reset password, verify, new account,
invitations) get an HTML part built from the same translated text, everything
escaped and only http(s) linked. `tests/accountEmailHtml.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/349d6dc5e6">Webhooks can also direct-message the card's people on Mattermost</a>. Thanks to xet7.</summary>
A webhook's new tick sends each message about a card to its members and
assignees as `@username`, never to whoever made the change, at most 50.
`tests/mattermostDirectMessages.test.cjs`,
[Mattermost](docs/Features/Webhooks/Chat/Mattermost.md).
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/0a5ae3e205">Browser push notifications, per device</a>. Thanks to saurabharch, hingerl and xet7.</summary>
Member Settings → Notification Settings → Browser notifications on this
device: every notification the member gets also pops up from that browser,
even with WeKan closed, and a click opens the card. web-push 3.6.7 (pinned)
sends it with this WeKan's own VAPID keys. A subscription is accepted only over
https and only at the push services browsers use, checked when saved and
before every send. Not offered on Sandstorm.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/656af74b2c">An activity feed across all of a member's boards</a>. Thanks to xet7.</summary>
Member menu → Activity on all my boards lists what happened on every board the
member sees, newest first, 50 at a time, in the sentences the notifications
use. It never carries a field's value, follows the assigned-only rule, and is
empty when the Admin Panel turns activities off. `tests/activityFeed.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/c3321926ab">Webhooks: pick which activities a webhook is sent</a>. Thanks to xet7.</summary>
The webhook form gets "Send this webhook:" with Every activity and a tick per
kind of activity - the groups notifications are muted by. Nothing ticked stays
"all", so a webhook never silently gets nothing.
`tests/webhookActivityPicker.test.cjs`.
</details>
**Rules** - who sees them, and who their e-mails go to.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/f4a3690256">Board members can be shown the Rules, read-only</a>. Thanks to justinr1234 and xet7.</summary>
An Admin Panel option, off by default, lets board admins tick "Show these
Rules to board members, read-only"; members then read the rules list and
details with no control that changes them. Without both ticks only admins see
the Rules page. `tests/rulesReadOnly.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/75e260966b">Pick board members for a rule e-mail's To field</a>. Thanks to chenghongxi and xet7.</summary>
A member picker with autocomplete adds `@username`, which becomes that member's
current address when the rule runs; free addresses still work, and a name of
somebody outside the board is dropped. `tests/ruleEmailMembers.test.cjs`.
</details>
**Boards** - subtasks, teams and leaving a board.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/740c3920eb">Board Settings / Subtasks picks the swimlane new subtasks land in</a>. Thanks to BjoernLudwig and xet7.</summary>
Beside the landing list; unset keeps the parent's swimlane title, else the
default. `tests/subtaskLandingSwimlane.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/1acc9f2b9f">Leaving a board that came through a team hides it, restorably</a>. Thanks to LaureHades and xet7.</summary>
Such a board goes into the member's hidden list, out of All Boards, and Member
Settings / Hidden boards restores it; the team membership is untouched.
`tests/hiddenBoards.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/ed2649f702">A board admin may add only the organizations and teams they belong to</a>. Thanks to chrisi51 and xet7.</summary>
Site admins may add any; links already on a board stay, and removing is always
allowed. The pickers offer only the admin's own groups.
`tests/boardGroupLinks.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/2fd3993538">A linked whole list: a live mirror of another board's list</a>. Thanks to javen9881 and xet7.</summary>
The add-list form can link a list from another board: its cards appear live
and stay the source board's cards, under its rules, and a card typed into the
mirror is added to the source list only for somebody who may write there. The
cards are published only to a subscriber who sees both boards. No self links,
archived or foreign lists, or mirrors of mirrors. `tests/linkedList.test.cjs`.
</details>
**Cards and checklists** - kinds of card, subtasks from other boards, and
who does each checklist item.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/0d77882c3b">Story and Task cards, with custom fields of their own</a>. Thanks to nightwind27 and xet7.</summary>
Card menu / Card kind makes a card a Story or a Task, with a badge on the
minicard. A custom field limited to a kind is added to a card when it gets
that kind and shown only on cards of it. `tests/cardKinds.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/e9af50ff07">An existing card from another board as a subtask</a>. Thanks to TiibCD and xet7.</summary>
The existing-card picker gets a board picker; another board's card is
attached on the server, which checks write access to both boards and loops
through every parent. `tests/crossBoardSubtasks.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/7ca1489279">A person responsible for each checklist item, and dated items in the calendar and Gantt</a>. Thanks to martinbruno90 and xet7.</summary>
Each item gets a responsible board member. Items with a due date appear in
the calendar and both Gantt views as "card: item"; moving one moves only the
item's date. `tests/checklistItemSchedule.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/9138e85091">Edit a card description together, live</a>. Thanks to dalareo and xet7.</summary>
Everybody with a card's description open edits one shared Yjs document, so two
people typing at once both keep what they typed instead of the later Save
replacing the earlier. The editor stays the Markdown textarea, with the caret
kept where it was; Save writes the description as before. The document is
published only to people who may edit the card, merged with a conditional
write, size-limited and rate-limited, and started again when the description
changes some other way. yjs 13.6.33 (pinned). `tests/sharedDescription.test.cjs`
runs the real Yjs.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/c772769c0e">Draw or write by hand on a card, saved as PNG and SVG</a>. Thanks to aleroot and xet7.</summary>
Card menu → Drawing: draw with a mouse, pen or finger, undo and clear. The
strokes stay on the card so the drawing can be edited later, and a PNG is
uploaded as an attachment; Download as SVG builds the SVG from the strokes.
Only numbers and the allowed colours and widths reach the SVG.
`tests/cardDrawing.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/d8690a26f5">Cards changed since a member last opened them are marked</a>. Thanks to Lacour20, martinpospech and xet7.</summary>
Member Settings → Mark cards changed since I last opened them, off by default:
a minicard gets a blue edge when its fields, checklists, attachments or
comments changed after the member last opened it. Turning it on does not mark
every old card, and the member's own edits do not mark it.
`tests/unreadChanges.test.cjs`.
</details>
**Board views** - the Table and Swimlanes views.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/0a566dc9ac">The Table view adds cards, and moves them by dragging a row onto another</a>. Thanks to guakamole and xet7.</summary>
An add row under the table takes a title, list and swimlane, checked on the
server; dropping a row puts its card just before the target card.
`tests/tableViewDrop.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/9d95bda245">One shared, sticky list header row for all swimlanes</a>. Thanks to mikesutton and xet7.</summary>
A Board Settings / Swimlane setting, off by default: the first swimlane's list
headers stay at the top, through the existing sticky rule, and the others are
not repeated. `tests/sharedListHeaders.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/03d0144538">Column sets: the same cards in several named sets of columns</a>. Thanks to kentonv and xet7.</summary>
A new board view. A board keeps named column sets - say Completion, Priority,
Milestone - and every card is in one column of each set. Dragging a card moves
it only within the shown set, and each card shows its columns in the other sets
as coloured labels. Board admins make the sets; the Admin Panel can turn the
view off. Documented in [Column-Sets.md](docs/Features/Board/Column-Sets.md).
</details>
**All Boards** - finding boards among many.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/000bc1c490">Boards grouped by first character, organization, team and board label</a>. Thanks to xet7.</summary>
A facet bar shows each group with its count, and a click shows only that
group. Board labels are the member's own, applied to every board whose name
includes some text. `tests/allBoardsFacets.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/d04b8444a6">A tab per organization and team, where their admins manage members</a>. Thanks to xet7.</summary>
The left menu of All Boards gets a tab for each organization and team the
member is in, with its boards and its members. The group's admins and site
admins add and remove members there; a group that comes from LDAP or another
directory is read-only, because WeKan never writes directory groups back.
`tests/groupMembers.test.cjs`.
</details>
**Platforms** - phones, Sandstorm and free JavaScript.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/52b0ea0d81">Share to WeKan from other Android apps</a>. Thanks to memeplex and xet7.</summary>
The manifest's share target opens "Add to WeKan": pick a board and list and
what was shared becomes a card. The server checks the right to write in that
list. `tests/shareTarget.test.cjs`,
[Android](docs/Platforms/FOSS/OS/Android.md).
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/d1d806de2c">On Sandstorm, Copy card URL shares the card through Sandstorm</a>. Thanks to AlexanderZobkov and xet7.</summary>
It opens Sandstorm's Share Access dialog for the card's page, whose link opens
the grain there; elsewhere it copies as before. `tests/sandstormShare.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/631a7fdfe2">LibreJS license information for the browser bundle</a>. Thanks to alexgleason and xet7.</summary>
`/jslicense.html` is a JS Web Labels table of the scripts actually served, and
every page links it with `rel="jslicense"`. `tests/jsWebLabels.test.cjs`.
</details>
**Nextcloud and the fediverse** - calendars, files and followers outside WeKan.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/c76f3e2e98">CalDAV: card due dates in Nextcloud Calendar or any CalDAV calendar</a>. Thanks to scriptPilot and xet7.</summary>
Board Settings → Date → Calendar sync: each card with a due date is one event
in the chosen calendar, removed when the due date goes, and a due date moved in
the calendar comes back to the card every 15 minutes. The calendar's password
is never published and only a board admin sees the link; requests go through
the SSRF guard. `tests/caldavSync.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/4234081752">WebDAV attachment storage: Nextcloud Files or any WebDAV server</a>. Thanks to scriptPilot and xet7.</summary>
Admin Panel → Attachments → WebDAV (Nextcloud Files), beside S3, Azure and
Google Cloud Storage, with the same switches, connection test, default storage
and Move Attachment. The password is a secret field like the others, and
redirects are refused. With CalDAV this completes #687; the Nextcloud ExApp is
built by `.github/workflows/nextcloud.yml`. `tests/webdavStorage.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/bf633b9c72">ActivityPub: a public board can be followed from Mastodon</a>. Thanks to ASLLR and xet7.</summary>
Admin Panel → Settings → Visibility → Features → ActivityPub, off by default:
each public board is an actor, `@board-<id>` at this WeKan, and its new card
activity reaches its followers as signed Notes. It is read-only - only signed
Follow and Undo Follow are acted on - and a private board is never an actor.
Outgoing requests go through the SSRF guard. `tests/activityPub.test.cjs`.
</details>
and fixes the following bugs:
**Speed** - finding a card's subtasks.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/0c6c0c6021">Finding subtasks no longer scans every card</a>. Thanks to Raymond-Voogt and xet7.</summary>
Subtasks of several parents are found with `{ $or: [{ parentId }, { parentIds }]
}`,
and only `parentId` had an index - a `$or` uses indexes only when every branch
has one, so removing, copying and exporting cards scanned the whole collection.
`parentIds` has its own index now, and `tests/cardQueryIndexes.test.cjs`
requires
an index for every branch of every subtask `$or`.
</details>
**Startup** - a schema WeKan could not start with.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/d3966fa6b9">Story and Task cards no longer stop WeKan at startup</a>. Thanks to xet7.</summary>
The unreleased Story and Task commit declared `cardKinds` as `type: [String]`,
which the schema library refuses at startup. It is `type: Array` with a
`cardKinds.$` entry, and `tests/cardKinds.test.cjs` pins the form.
</details>
**Accessibility** - screen readers.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/8d71c6f925">Every icon-only link and button has a name for screen readers</a>. Thanks to ndarilek and xet7.</summary>
21 controls showed only an icon and had no name: the drag handles, the inline
forms' close buttons, a card's date buttons, the notification drawer, History's
previous and next and others. Each has a translated title, which becomes its
`aria-label`, and `tests/iconOnlyControlLabels.test.cjs` scans every template
for an unnamed icon-only control. Part of #337.
</details>
and has the following developer-tooling and translation changes:
- [The new strings translated in all 234 locales](https://github.com/wekan/wekan/commit/fdc52787e1). Thanks to xet7.
- [The Mattermost, Share to WeKan, passkey and hidden board strings translated](https://github.com/wekan/wekan/commit/5409e059ae). Thanks to xet7.
- [The risk baseline allows the Sandstorm share helper's addresses](https://github.com/wekan/wekan/commit/a4727e6764). Thanks to xet7.
- [The cross-board subtask, checklist owner, shared header, facet and card kind strings translated](https://github.com/wekan/wekan/commit/946f032883). Thanks to xet7.
- [The push, linked-list, column-set, drawing and team-tab strings translated](https://github.com/wekan/wekan/commit/2b84e6b616). Thanks to xet7.
- [The ActivityPub, CalDAV and WebDAV strings, translated](https://github.com/wekan/wekan/commit/2c9df4db88). Thanks to xet7.
- [The SQRL strings translated](https://github.com/wekan/wekan/commit/b0e47537e0). Thanks to xet7.
- [A test pins the issue's own example of keeping #label and @member](https://github.com/wekan/wekan/commit/cd4c4ad9ce), which shipped in v12.43. Thanks to biji and xet7.
- [A guard skips every rspack output directory, not only _build](https://github.com/wekan/wekan/commit/5f2dd80f41). Thanks to xet7.
Thanks to above GitHub users for their contributions and translators for their translations.
+19 -17
View File
@@ -5,6 +5,25 @@ each one changed and the project status are in
Written by `node releases/changelog-short.mjs` from CHANGELOG-big.md:
make changes there.
# v13.14 2026-11-16 WeKan ® release
a **checklist folded on a minicard** stays folded, and every
profile preference survives a reconnect. The **card shortcuts** open only their
popup, **one shared list header row** really hides the other swimlanes'
headers, and the editors no longer show "comment-placeholder" after the
**i18next 27** update. **Deleting a card** keeps its attachments recoverable.
[All changes in v13.14](CHANGELOG-big.md#v1314-2026-11-16-wekan--release)
# v13.13 2026-11-15 WeKan ® release
**Copy Checklist** and the other destination pickers list the
cards of a large board again: a board that loads its cards lazily used to leave
the card dropdown empty. Dependabot's updates, among them **i18next 27** and
the **mongodb** driver 7.8.0, are kept.
[All changes in v13.13](CHANGELOG-big.md#v1313-2026-11-15-wekan--release)
# v13.12 2026-11-14 WeKan ® release
WeKan is updated to **Meteor 3.6.1**, whose DDP server refuses
@@ -35,20 +54,3 @@ The release's **Snap Store** credential check bounds each
snapcraft install attempt, so a Snap Store that hangs no longer stops a release.
[All changes in v13.10](CHANGELOG-big.md#v1310-2026-11-13-wekan--release)
# v13.09 2026-11-12 WeKan ® release
The release's **Snap Store** credential check retries installing
snapcraft, so one Snap Store timeout no longer stops a release.
[All changes in v13.09](CHANGELOG-big.md#v1309-2026-11-12-wekan--release)
# v13.08 2026-11-12 WeKan ® release
The **REST API** creates a card under the **parent** it is given,
and a refused **integration URL** no longer leaves the other fields of the same
update written. The **single-file** WeKan for **32-bit ARM** builds again, with
an i386 Node.js of the exact version its bundle embeds. A **GitHub CodeQL**
alert in the security alert download script is fixed.
[All changes in v13.08](CHANGELOG-big.md#v1308-2026-11-12-wekan--release)
+1 -1
View File
@@ -38,7 +38,7 @@ FROM --platform=$BUILDPLATFORM debian:trixie AS bundle
ARG TARGETARCH
ARG TARGETVARIANT
ARG VERSION=13.12
ARG VERSION=13.14
ARG DEBIAN_FRONTEND=noninteractive
COPY --chmod=755 releases/check-telemetry.py /tmp/check-telemetry.py
+1 -1
View File
@@ -1,5 +1,5 @@
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
appVersion: "v13.12.0"
appVersion: "v13.14.0"
files:
userUploads:
- README.md
+17 -7
View File
@@ -2400,7 +2400,10 @@ Template.cardDestinationPicker.helpers({
destinationError() { return Template.instance().dialog.error.get(); },
destinationDisabled() {
const dialog = Template.instance().dialog;
return dialog.loading.get() || dialog.saving.get() || !dialog.selectedSwimlaneId.get() || !dialog.selectedListId.get();
// #6917: and until the chosen list's cards are there, so a move or copy
// never places the card against a dropdown that has not filled yet.
return dialog.loading.get() || dialog.saving.get() || !!dialog.cardsLoading?.get()
|| !dialog.selectedSwimlaneId.get() || !dialog.selectedListId.get();
},
boards() {
return Template.instance().dialog.boards();
@@ -2465,7 +2468,7 @@ function registerCardDialogTemplate(templateName) {
async 'click .js-done'(event, tpl) {
event.preventDefault();
const dialog = tpl.dialog;
if (dialog.loading.get() || dialog.saving.get()) return;
if (dialog.loading.get() || dialog.saving.get() || dialog.cardsLoading?.get()) return;
// Read the target board/swimlane/list from the dialog's live reactive
// selection rather than the DOM <select> elements. A reactive re-render
// (e.g. the boards() helper transiently returning [] while a 'board'
@@ -2934,6 +2937,7 @@ Template.cardMorePopup.onCreated(function () {
// is no longer blank the first time another board is picked (the cards()
// helper queries minimongo, which was empty before the subscription arrived).
this.parentBoardReady = new ReactiveVar(true);
this.view.onViewDestroyed(() => this.parentCardsSubscription?.stop());
this.parentCard = this.currentCard?.parentCard();
if (this.parentCard) {
const list = $('.js-field-parent-card');
@@ -3080,11 +3084,17 @@ Template.cardMorePopup.events({
// #3745: wait for the board subscription to be ready before showing its
// cards, so the parent-card list is populated on the first selection.
tpl.parentBoardReady.set(false);
Meteor.subscribe('board', selection, false, {
onReady() {
tpl.parentBoardReady.set(true);
},
});
// #6917: a lazily loaded board's `board` publication ships no cards, so
// the parent-card list also subscribes to the board's card titles, and
// is ready when both are.
tpl.parentCardsSubscription?.stop();
let pending = 2;
const ready = () => {
pending -= 1;
if (pending === 0 && tpl.parentBoard.get() === selection) tpl.parentBoardReady.set(true);
};
Meteor.subscribe('board', selection, false, { onReady: ready });
tpl.parentCardsSubscription = Meteor.subscribe('destinationCards', selection, null, null, { onReady: ready });
tpl.parentBoard.set(selection);
list.prop('disabled', false);
}
+1 -1
View File
@@ -347,7 +347,7 @@ template(name="copyAndMoveChecklist")
option(value="{{_id}}" selected="{{#if isDialogOptionCardId _id}}selected{{/if}}") {{title}}
.edit-controls.clearfix
button.primary.confirm.js-done {{_ 'done'}}
button.primary.confirm.js-done(type="button" disabled=doneDisabled) {{_ 'done'}}
//- Due date on a single checklist item (#4755). The badge and its edit popup
reuse the card's own date-badge markup (dateBadgeBody) and date-picker form
+11
View File
@@ -841,6 +841,11 @@ Template.copyAndMoveChecklist.helpers({
const dialog = getParentDialog(Template.instance());
return dialog ? dialog.isTitleDefault(title) : title;
},
// #6917: Done waits for the destination list's cards.
doneDisabled() {
const dialog = getParentDialog(Template.instance());
return !dialog || dialog.loading.get() || dialog.cardsLoading.get() || dialog.cards().length === 0;
},
});
/**
@@ -865,6 +870,11 @@ function registerChecklistDialogEvents(templateName) {
? cardSelect.options[cardSelect.selectedIndex].value
: null;
// #6917: every checklist dialog needs a card, and the dropdown may still
// be filling: Done does nothing until a card of the list is chosen.
if (dialog.loading.get() || dialog.cardsLoading.get()) return;
if (!cardId || !dialog.cards().some(card => card._id === cardId)) return;
const options = { boardId, swimlaneId, listId, cardId };
try {
await dialog.setDone(cardId, options);
@@ -879,6 +889,7 @@ function registerChecklistDialogEvents(templateName) {
'change .js-select-swimlanes'(event, tpl) {
tpl.dialog.selectedSwimlaneId.set($(event.currentTarget).val());
tpl.dialog.setFirstListId();
tpl.dialog.selectedCardId.set('');
},
'change .js-select-lists'(event, tpl) {
tpl.dialog.selectedListId.set($(event.currentTarget).val());
+11
View File
@@ -1209,6 +1209,17 @@ Template.linkCardPopup.onCreated(function () {
else if (Utils.boardView() === 'board-view-lists' || !Utils.boardView)
this.swimlaneId = listData.swimlaneId || ReactiveCache.getSwimlane({ boardId: this.boardId })._id;
// #6917: the cards offered for linking come from their own subscription. A
// lazily loaded board's `board` publication ships no cards, so a large board
// picked here listed none. Inside the autorun, the previous selection's
// subscription stops when another board, swimlane or list is chosen.
this.autorun(() => {
const boardId = this.selectedBoardId.get();
if (!boardId) return;
this.subscribe('destinationCards', boardId,
this.selectedListId.get() || null, this.selectedSwimlaneId.get() || null);
});
this.getSortIndex = () => {
let ret;
if (this.position === 'top') {
+8 -2
View File
@@ -463,7 +463,13 @@ body.swimlane-resizing-active * {
/* #2805: one shared list header row for all swimlanes (Board Settings /
Swimlane). The other swimlanes do not repeat the first swimlane's list
headers; those stay at the top through the same sticky rule as Sticky list
headers (#3847, lists/list.css), which the setting turns on. */
headers (#3847, lists/list.css), which the setting turns on.
!important: the desktop list header layout sets `display: block !important`
(lists/list.css `.list:not(.list-collapsed):not(.mobile-view) .list-header`,
boardHeader.css `.desktop-mode .list-header`), and a plain `display: none`
loses to any !important one, so every swimlane kept its headers. Between
!important declarations specificity decides, and this selector (0,5,0)
outranks those (0,4,0 at most). tests/sharedListRow6902.test.cjs. */
.board-canvas.shared-list-headers .js-swimlane:not(.is-first-swimlane) .list-header {
display: none;
display: none !important;
}
+57
View File
@@ -0,0 +1,57 @@
// #6924: the card shortcuts open ONLY their popup. `d` (Due date), Shift+M
// (Move card) and Shift+C (Copy card) on a hovered or selected minicard used
// to open the card first, and Shift+M / Shift+C went through the card's
// hamburger menu too - three things for one key. Now the popup opens by
// itself, next to the minicard, as a click on a minicard's due date or label
// opens only its popup; on an opened card, Move / Copy open next to the card's
// hamburger without showing the menu first.
//
// The popup is opened directly, so these are the rules a click would meet.
// Each one is the condition the opened card renders that control under, and
// tests/cardShortcutPopup.test.cjs ties every rule to that template:
// due cardDetails.jade: `if currentBoard.allowsDueDate`, then the date
// badge (`if canModifyCard`) when the card has a due date, or the add
// `+` (`if canModifyCard` / `unless currentUser.isWorker`) when not;
// move cardDetailsActionsPopup: `if cardMenuWrites` / `if currentUser.isBoardAdmin`;
// copy cardDetailsActionsPopup: `if cardMenuWrites` / `unless currentUser.isWorker`.
// cardMenuWrites (cardDetails.js) is: may modify the card, or is a member who
// is neither read-only nor read-assigned-only.
//
// Pure, no Meteor imports, so the test drives it without a browser.
export const CARD_SHORTCUT_POPUPS = Object.freeze({
due: 'editCardDueDate',
move: 'moveCard',
copy: 'copyCard',
});
// facts: { canModifyCard, isBoardAdmin, isWorker, isReadOnly,
// isReadAssignedOnly, allowsDueDate, hasDue } - booleans.
// Returns the popup name to open, or null when a click could not open it.
export function cardShortcutPopup(action, facts = {}) {
const f = facts || {};
const cardMenuWrites = Boolean(f.canModifyCard) || !(f.isReadOnly || f.isReadAssignedOnly);
switch (action) {
case 'due':
if (f.allowsDueDate === false || !f.canModifyCard) return null;
if (!f.hasDue && f.isWorker) return null;
return CARD_SHORTCUT_POPUPS.due;
case 'move':
return cardMenuWrites && f.isBoardAdmin ? CARD_SHORTCUT_POPUPS.move : null;
case 'copy':
return cardMenuWrites && !f.isWorker ? CARD_SHORTCUT_POPUPS.copy : null;
default:
return null;
}
}
const SAFE_ID = /^[A-Za-z0-9_-]+$/;
// The minicard element of a card, to anchor its popup: the hovered one when it
// is that card (a card can be on the board more than once), else the first.
// null for an id that is not a plain id, so it never reaches a selector.
export function findMinicard(root, cardId, hovered = null) {
if (!root || typeof cardId !== 'string' || !SAFE_ID.test(cardId)) return null;
if (hovered && hovered.getAttribute && hovered.getAttribute('data-card-id') === cardId) return hovered;
return root.querySelector(`.js-minicard[data-card-id="${cardId}"]`) || null;
}
@@ -265,9 +265,6 @@ export class BoardSwimlaneListDialog {
const lanes = this.swimlanes();
if (!lanes.some(lane => lane._id === this.selectedSwimlaneId.get())) this.setFirstSwimlaneId();
if (!this.lists().some(list => list._id === this.selectedListId.get())) this.setFirstListId();
if (this.selectedCardId && !this.cards().some(card => card._id === this.selectedCardId.get())) {
this.selectedCardId.set('');
}
this.loading.set(false);
},
onStop: error => {
+30 -1
View File
@@ -10,6 +10,33 @@ export class BoardSwimlaneListCardDialog extends BoardSwimlaneListDialog {
constructor(tpl, callbacks = {}) {
super(tpl, callbacks);
this.selectedCardId = new ReactiveVar(this.cardOption.cardId || '');
this.cardsLoading = new ReactiveVar(true);
// #6917: the destination's cards come from a picker-owned subscription,
// not from the `board` publication, which ships no cards at all for a
// board that loads lazily (Card loading = lazy, or 'auto' above the
// threshold). Subscribing inside the template's autorun stops the previous
// list's subscription when another board, swimlane or list is chosen, and
// the last one when the popup closes.
this.tpl.autorun?.(() => {
const boardId = this.selectedBoardId.get();
const listId = this.selectedListId.get();
const swimlaneId = this.selectedSwimlaneId.get();
const request = (this._cardsRequest = (this._cardsRequest || 0) + 1);
this.cardsLoading.set(true);
if (!boardId || !listId || !swimlaneId) return;
this.tpl.subscribe('destinationCards', boardId, listId, swimlaneId, {
onReady: () => {
if (this._disposed || request !== this._cardsRequest) return;
// A remembered card is checked here, once this list's cards are
// there - the board being ready says nothing about its cards.
const cardId = this.selectedCardId.get();
if (cardId && !this.cards().some(card => card._id === cardId)) {
this.selectedCardId.set('');
}
this.cardsLoading.set(false);
},
});
});
}
getDefaultOption() {
@@ -37,7 +64,9 @@ export class BoardSwimlaneListCardDialog extends BoardSwimlaneListDialog {
});
const swimlaneId = this.selectedSwimlaneId.get();
if (list && swimlaneId) {
return list.cards(swimlaneId).sort((a, b) => a.sort - b.sort);
// Unfiltered: the open board's Filter describes that board, and must not
// empty the dropdown of the destination (#6917).
return list.cardsUnfiltered(swimlaneId).sort((a, b) => a.sort - b.sort);
} else {
return [];
}
+54 -29
View File
@@ -10,7 +10,8 @@ import { Utils } from '/client/lib/utils';
import { newHistoryRequestId, runKeystroke } from '/client/lib/historyKeyRequest';
import { historyRequestStorage, refreshPendingHistoryRequest } from '/client/lib/historyKeyRecovery';
import { findDueDateControl } from '/client/lib/dueDateHotkey';
import { cardMenuStep } from '/client/lib/cardMenuHotkey';
import { findCardMenuOpener } from '/client/lib/cardMenuHotkey';
import { cardShortcutPopup, findMinicard } from '/client/lib/cardShortcutPopup';
// Late-bind Sidebar to avoid circular dependency (sidebar.js needs its template first)
let _Sidebar;
@@ -424,39 +425,67 @@ export function openDueDateEditorOfOpenedCard() {
return true;
}
// #6755: with no card opened, `d` on a hovered or selected minicard - the
// card every other card shortcut here acts on - opens that card and then
// its Due date editor, rather than doing nothing until the card is opened.
const minicardId = Session.get('selectedCard') || getHoveredCardId();
const minicard = minicardId && ReactiveCache.getCard(minicardId);
if (!minicard || !Utils.canModifyCard(minicard)) return false;
Utils.goCardId(minicardId);
setTimeout(() => clickDueDateControlWhenRendered(minicardId), 0);
return true;
// card every other card shortcut here acts on - opens its Due date editor.
// #6924: only the editor, next to the minicard, as a click on the
// minicard's due date does; the card itself stays closed.
return openCardShortcutPopupAtMinicard('due');
}
hotkeys('d, shift+d', (event) => {
event.preventDefault();
openDueDateEditorOfOpenedCard();
});
// #6904: Shift+M opens Move card and Shift+C opens Copy card, through the
// opened card's own hamburger menu (client/lib/cardMenuHotkey.js), so the
// menu's permissions decide whether there is anything to open. With no card
// opened, the hovered or selected minicard is opened first, as for `d`.
// Shift keeps them apart from `m` (assign yourself) and `c` (archive).
function runCardMenuActionWhenRendered(cardId, action) {
// #6904: Shift+M opens Move card and Shift+C opens Copy card. Shift keeps them
// apart from `m` (assign yourself) and `c` (archive).
// #6924: each opens ONLY its popup. The popup is opened directly, so
// cardShortcutPopup (client/lib/cardShortcutPopup.js) applies the rules the
// controls a click would use are rendered under - the hamburger menu's Move
// card / Copy card items, the due date badge and its `+` - and without them
// nothing opens.
function cardShortcutFacts(card) {
const user = ReactiveCache.getCurrentUser();
const board = ReactiveCache.getBoard(card.boardId);
return {
canModifyCard: Utils.canModifyCard(card),
isBoardAdmin: Boolean(user && user.isBoardAdmin && user.isBoardAdmin()),
isWorker: Boolean(user && user.isWorker && user.isWorker()),
isReadOnly: Boolean(user && user.isReadOnly && user.isReadOnly()),
isReadAssignedOnly: Boolean(user && user.isReadAssignedOnly && user.isReadAssignedOnly()),
allowsDueDate: !board || board.allowsDueDate !== false,
hasDue: Boolean(card.getDue && card.getDue()),
};
}
// Opens the popup next to `anchor`, with the card as its data context - as
// the minicard's own menu and date badges open theirs (minicard.js,
// cardDate.js openDateEditor).
function openCardShortcutPopup(action, card, anchor) {
const name = cardShortcutPopup(action, cardShortcutFacts(card));
if (!name || !anchor) return false;
Popup.open(name).call(card, { currentTarget: anchor, target: anchor, preventDefault() {} });
return true;
}
// With no card opened: the hovered or selected minicard, the card every other
// card shortcut here acts on. The card is not opened.
function openCardShortcutPopupAtMinicard(action) {
const minicardId = Session.get('selectedCard') || getHoveredCardId();
const minicard = minicardId && ReactiveCache.getCard(minicardId);
if (!minicard) return false;
const anchor = findMinicard(document, minicardId, $('.js-minicard:hover').get(0));
return openCardShortcutPopup(action, minicard, anchor);
}
// #6840: an opened card's details render a moment after the route names it,
// so the popup waits for the card's hamburger to anchor to, and gives up
// after 3 seconds.
function openCardShortcutPopupWhenRendered(cardId, action) {
const started = Date.now();
let menuOpened = false;
const step = () => {
if (Utils.getCurrentCardId() !== cardId) return;
const result = cardMenuStep(document, {
cardId, action, menuOpened, dataOf: element => Blaze.getData(element),
});
if (result === 'clicked-item') return;
if (result === 'no-item') {
Popup.close();
const card = ReactiveCache.getCard(cardId);
const anchor = card && findCardMenuOpener(document, { cardId, dataOf: element => Blaze.getData(element) });
if (anchor) {
openCardShortcutPopup(action, card, anchor);
return;
}
if (result === 'opened-menu') menuOpened = true;
if (Date.now() - started < 3000) setTimeout(step, 50);
};
step();
@@ -466,14 +495,10 @@ export function openCardMenuActionOfOpenedCard(action) {
const cardId = Utils.getCurrentCardId();
if (cardId) {
if (!ReactiveCache.getCard(cardId)) return false;
runCardMenuActionWhenRendered(cardId, action);
openCardShortcutPopupWhenRendered(cardId, action);
return true;
}
const minicardId = Session.get('selectedCard') || getHoveredCardId();
if (!minicardId || !ReactiveCache.getCard(minicardId)) return false;
Utils.goCardId(minicardId);
setTimeout(() => runCardMenuActionWhenRendered(minicardId, action), 0);
return true;
return openCardShortcutPopupAtMinicard(action);
}
hotkeys('shift+m', (event) => {
event.preventDefault();
+5 -2
View File
@@ -884,9 +884,12 @@ export const Utils = {
// never chosen. The three states matter — see showDragHandles() below.
dragHandlesPreference() {
// #6745: read by every minicard - one field, not the whole user document.
const currentUser = currentUserWith(['profile.showDesktopDragHandles']);
// #6919: the profile's own value when the client has the profile, else the
// one userDesktopDragHandles publishes under a top-level field of its own.
const currentUser = currentUserWith(['profile.showDesktopDragHandles', 'desktopDragHandlesPreference']);
const fromProfile = currentUser && (currentUser.profile || {}).showDesktopDragHandles;
const stored = currentUser
? (currentUser.profile || {}).showDesktopDragHandles
? (fromProfile !== undefined ? fromProfile : currentUser.desktopDragHandlesPreference)
// Not logged in: the same three states, kept in localStorage. A MISSING
// key is "never chosen"; the string 'false' is a deliberate "off".
: window.localStorage.getItem('showDesktopDragHandles');
@@ -10,7 +10,7 @@ This is without container (without Docker or Snap).
Right click and download files 1-4:
1. [wekan-13.12-win64.zip](https://github.com/wekan/wekan/releases/download/v13.12/wekan-13.12-win64.zip) or newest available at https://github.com/wekan/wekan/releases/
1. [wekan-13.14-win64.zip](https://github.com/wekan/wekan/releases/download/v13.14/wekan-13.14-win64.zip) or newest available at https://github.com/wekan/wekan/releases/
2. [node.exe](https://nodejs.org/dist/latest-v26.x/win-x64/node.exe)
@@ -22,7 +22,7 @@ Right click and download files 1-4:
6. Double click `mongodb-windows-x86_64-7.0.34-signed.msi` . In installer, uncheck downloading MongoDB compass.
7. Unzip `wekan-13.12-win64.zip` , inside it is directory `bundle`, to it copy other files:
7. Unzip `wekan-13.14-win64.zip` , inside it is directory `bundle`, to it copy other files:
```
bundle (directory)
+29 -6
View File
@@ -500,13 +500,36 @@ PATH="$T/node-v26.9.0-linux-arm64/bin:$PATH" MONGO_URL="mongodb://127.0.0.1:2701
# -> http://localhost:8080 serves once startup finishes (~10-30s).
```
### Docker is NOT available inside this Flatpak sandbox
### Docker: the host's, through `flatpak-spawn --host`
`docker` / `docker-compose` / `podman` are not present in the VSCodium Flatpak sandbox, so
`docker compose up` cannot be run here. To reproduce a `docker-compose.yml`-style setup,
run FerretDB and the bundle manually as shown above (the compose `ferretdb` service just
downloads and runs the same `ferretdb-<arch>` binary; the `wekan` service just runs the
same bundle). The Docker-only startup race in #6500 (WeKan starting before FerretDB is
`docker` / `docker-compose` / `podman` are not installed inside the VSCodium Flatpak
sandbox. `vscodium-sandbox.sh` grants `--talk-name=org.freedesktop.Flatpak`, so the
HOST's Docker can be reached as `flatpak-spawn --host docker ...`. `build.sh`'s
`docker_available` and `docker_exec` use exactly that when `docker` is not in `PATH`,
which is how Playwright Firefox and WebKit run in the official Playwright image when
they cannot start inside the sandbox (Firefox needs user namespaces the sandbox
refuses; WebKit needs `libgtk-4`):
```bash
flatpak-spawn --host docker version # check: the host's Docker answers
WEKAN_PLAYWRIGHT_DOCKER=1 ./build.sh # all browsers in the Playwright image
```
Docker must be installed on the host, and the host user must be in the `docker`
group (`sudo usermod -aG docker $USER`, then log in again).
**This is a hole in the sandbox, on purpose.** `flatpak-spawn --host` runs ANY
command on the host, outside every restriction above, and the Docker socket is
root-equivalent on the host. An AI assistant's own permission settings should
therefore allow only `flatpak-spawn --host docker ...`, never `flatpak-spawn
--host` in general. To keep the sandbox closed, launch it with
`WEKAN_SANDBOX_HOST_DOCKER=0 ./vscodium-sandbox.sh`; then `flatpak-spawn --host`
fails, and the browsers that need Docker have to be run on the host.
Without Docker, reproduce a `docker-compose.yml`-style setup by running FerretDB and
the bundle manually as shown above (the compose `ferretdb` service just downloads and
runs the same `ferretdb-<arch>` binary; the `wekan` service just runs the same
bundle). The Docker-only startup race in #6500 (WeKan starting before FerretDB is
ready) is fixed in `docker-compose.yml` with a ferretdb healthcheck + `depends_on:
condition: service_healthy`; when running manually, always start FerretDB first.
@@ -1,9 +1,23 @@
#!/usr/bin/env bash
# Reset previous attempts
#flatpak kill com.vscodium.codium
flatpak install -y com.vscodium.codium
flatpak override --reset com.vscodium.codium
# Block EVERYTHING except the display and the wekan folder
# ... and one deliberate exception: --talk-name=org.freedesktop.Flatpak lets
# `flatpak-spawn --host docker ...` reach the HOST's Docker, which build.sh's
# docker_available/docker_exec use to run Playwright Firefox and WebKit in the
# official Playwright image when they cannot start inside this sandbox. It is
# a host escape (flatpak-spawn --host runs any host command, and the Docker
# socket is root-equivalent); set WEKAN_SANDBOX_HOST_DOCKER=0 to leave it out.
# README.md beside this file says what it costs.
HOST_DOCKER_ARGS=()
if [ "${WEKAN_SANDBOX_HOST_DOCKER:-1}" != 0 ]; then
HOST_DOCKER_ARGS=(--talk-name=org.freedesktop.Flatpak)
else
HOST_DOCKER_ARGS=(--no-talk-name=org.freedesktop.Flatpak)
fi
flatpak override com.vscodium.codium \
--nofilesystem=home \
--nofilesystem=host \
@@ -15,4 +29,5 @@ flatpak override com.vscodium.codium \
--socket=x11 \
--share=network \
--user \
--nosocket=ssh-auth
--nosocket=ssh-auth \
"${HOST_DOCKER_ARGS[@]}"
+1 -1
View File
@@ -646,7 +646,7 @@
"unset-color": "unakeka",
"comments": "Nā manaʻo",
"comment": "Manaʻo",
"comment-placeholder": "Ma ka ʻōlelo Hawaiʻi: ",
"comment-placeholder": "",
"comment-only": "manaʻo wale nō",
"comment-only-desc": "hiki manaʻo ma nā kāleka wale nō.",
"comment-assigned-only": "wale nō akakikaneka manaʻo",
+1 -1
View File
@@ -646,7 +646,7 @@
"unset-color": "Net festgelegt",
"comments": "Kommentaren",
"comment": "Kommentar",
"comment-placeholder": "Optioun: ",
"comment-placeholder": "",
"comment-only": "Nur Kommentaren",
"comment-only-desc": "Kann Kaarten nëmmen kommentieren.",
"comment-assigned-only": "Nur zugewiesener Kommentar",
+1 -1
View File
@@ -646,7 +646,7 @@
"unset-color": "Nia stabilì",
"comments": "Comënc",
"comment": "Coment",
"comment-placeholder": "Scrî n coment...",
"comment-placeholder": "",
"comment-only": "Mé comënc",
"comment-only-desc": "Possa mé scrì comënc sun la ciartes.",
"comment-assigned-only": "Mé comënc sun ciartes dates",
+1 -1
View File
@@ -646,7 +646,7 @@
"unset-color": "No impostadu",
"comments": "Cummentos",
"comment": "Cummentu",
"comment-placeholder": "Iscrie unu cummentu",
"comment-placeholder": "",
"comment-only": "Petzi cummentos",
"comment-only-desc": "Podet petzi cummentare sas cartas.",
"comment-assigned-only": "Petzi cummentos in sas assignadas",
+8
View File
@@ -320,6 +320,14 @@ describe('TAPi18n', () => {
expect(result).to.be.equal('Hello');
});
it('keeps an empty translation empty instead of returning its key (#6921)', () => {
TAPi18n.i18n.addResourceBundle('fr', 'translation', { 'empty-on-purpose': '' });
TAPi18n.i18n.addResourceBundle('en', 'translation', { 'empty-on-purpose': '' });
expect(TAPi18n.__('empty-on-purpose')).to.be.equal('');
expect(TAPi18n.__('empty-on-purpose', null, 'en')).to.be.equal('');
expect(TAPi18n.__('comment-placeholder', null, 'en')).to.be.equal('');
});
it('works with simple keys and custom language', async () => {
TAPi18n.i18n.addResourceBundle('de', 'translation', {
'simple': 'Hola',
+7
View File
@@ -62,6 +62,13 @@ export const TAPi18n = {
await this.i18n.init({
fallbackLng: DEFAULT_LANGUAGE,
cleanCode: true,
// i18next 27 changed this default to false, and an empty translation then
// falls back to the KEY: the description and comment editors showed the
// text "comment-placeholder" (#6921), and Blockly's empty suffixes showed
// their keys. Every empty value in en.i18n.json is empty on purpose, and
// no other language has an empty value where English has text
// (tests/i18nEmptyString.test.cjs), so an empty string stays empty.
returnEmptyString: true,
// Show translations debug messages only when DEBUG=true
// OLD: debug: Meteor.isDevelopment,
debug: process.env.DEBUG === 'true',
+2 -2
View File
@@ -203,7 +203,7 @@ Attachments.onAfterUpload = async function (fileObj) {
const originalName = fileObj.name;
const correctedName = sanitizeUploadFileName(originalName, detectedMime || fileObj.type);
if (correctedName && correctedName !== originalName) {
rename(fileObj, correctedName, fileStoreStrategyFactory);
await rename(fileObj, correctedName, fileStoreStrategyFactory);
fileObj.name = correctedName;
// Log to Admin Panel / Problems: who uploaded, why, when, where.
try {
@@ -464,7 +464,7 @@ Meteor.methods({
const cleanName = cleanFileName(newName);
if (!cleanName) throw new Meteor.Error('invalid-filename', 'This file name is not allowed.');
rename(fileObj, cleanName, fileStoreStrategyFactory);
await rename(fileObj, cleanName, fileStoreStrategyFactory);
},
async validateAttachment(fileObjId) {
check(fileObjId, String);
+1 -1
View File
@@ -107,7 +107,7 @@ Avatars.onAfterUpload = async function (fileObj) {
const originalName = fileObj.name;
const correctedName = sanitizeUploadFileName(originalName, detectedMime || fileObj.type);
if (correctedName && correctedName !== originalName) {
rename(fileObj, correctedName, fileStoreStrategyFactory);
await rename(fileObj, correctedName, fileStoreStrategyFactory);
fileObj.name = correctedName;
try {
await require('/server/lib/filenameSanitizeLog').logFilenameSanitized({
+9 -2
View File
@@ -4088,8 +4088,15 @@ async function cardRemover(userId, doc) {
await Cards.direct.updateAsync(shared._id, { $set: withParentRemoved(shared, doc._id) });
}
await Cards.removeAsync(onlyChildrenSelector(doc._id));
// Attachments keep the normal remove so the underlying file is deleted from the
// configured storage backend.
// Normal attachments store their card id in meta. Use the same recoverable
// deletion as the attachment UI/API so files and history remain restorable.
if (Meteor.isServer) {
const { softDeleteAttachment } = require('/server/attachmentSoftDelete');
for (const attachment of await Attachments.collection.find(liveAttachments({ 'meta.cardId': doc._id })).fetchAsync()) {
await softDeleteAttachment({ userId, attachment });
}
}
// Keep the existing hard purge for legacy top-level cardId records.
await Attachments.removeAsync({ cardId: doc._id });
}
+62
View File
@@ -0,0 +1,62 @@
'use strict';
// Which values profile.avatarUrl may hold, and whether a client modifier tries
// to store anything else. Pure, no Meteor and no Node built-ins, so the
// setAvatarUrl method, the Users deny rule and the tests share one rule.
//
// profile.avatarUrl is rendered as an <img src> and, once external, fetched by
// the server for localization (fetchSafe, http/https only). Accepted: an empty
// value (clearing), a WeKan-local path such as /cdn/storage/avatars/..., an
// http(s) URL, or a data:image URI. Refused: javascript:, data:text/html,
// file:, protocol-relative //host and every other scheme.
function isStorableAvatarUrl(avatarUrl) {
if (typeof avatarUrl !== 'string') return false;
if (avatarUrl === '') return true;
if (avatarUrl.startsWith('/') && !avatarUrl.startsWith('//')) return true;
const m = /^([a-z][a-z0-9+.\-]*):/i.exec(avatarUrl);
const scheme = m ? m[1].toLowerCase() : '';
if (scheme === 'http' || scheme === 'https') return true;
return scheme === 'data' && /^data:image\//i.test(avatarUrl);
}
function avatarUrlScheme(avatarUrl) {
const m = /^([a-z][a-z0-9+.\-]*):/i.exec(String(avatarUrl));
return m ? m[1].toLowerCase() : '';
}
const AVATAR_PATH = 'profile.avatarUrl';
// True when a client modifier would store an avatar URL setAvatarUrl refuses.
// The Users allow rule permits every profile.* field, so without this a direct
// Users.update({$set: {'profile.avatarUrl': 'javascript:...'}}) stored what the
// method rejects. $set and $setOnInsert are checked by value, whether written
// as the dotted path or inside a whole profile object; $unset clears it, which
// is fine; any other operator on the field ($rename onto it, $push, $inc, ...)
// is never how an avatar is set and is refused.
function writesUnsafeAvatarUrl(modifier) {
if (!modifier || typeof modifier !== 'object') return false;
return Object.entries(modifier).some(([operator, value]) => {
if (!value || typeof value !== 'object') return false;
if (operator === '$rename') {
return Object.values(value).some(to => to === AVATAR_PATH || to === 'profile');
}
return Object.keys(value).some(path => {
const touchesAvatar = path === AVATAR_PATH || path.startsWith(`${AVATAR_PATH}.`);
const wholeProfile = path === 'profile';
if (!touchesAvatar && !wholeProfile) return false;
if (operator === '$unset') return false;
if (operator !== '$set' && operator !== '$setOnInsert') return true;
if (wholeProfile) {
const profile = value[path];
if (!profile || typeof profile !== 'object') return false;
return Object.prototype.hasOwnProperty.call(profile, 'avatarUrl') &&
!isStorableAvatarUrl(profile.avatarUrl);
}
// profile.avatarUrl.something would turn the URL into an object.
return path !== AVATAR_PATH || !isStorableAvatarUrl(value[path]);
});
});
}
module.exports = { isStorableAvatarUrl, avatarUrlScheme, writesUnsafeAvatarUrl };
+50
View File
@@ -0,0 +1,50 @@
'use strict';
// Pure, Meteor-free helpers for the `destinationCards` publication (#6917).
// Unit-tested in tests/destinationCards6917.test.cjs.
//
// The destination pickers - Copy / Move checklist, Copy checklist from a
// template card, Move / Copy card, Link card, and the parent-card picker -
// list the cards of ANOTHER board, which they used to read from the `board` publication. On a
// board that loads lazily (Admin Panel / Features / Card loading = lazy, or
// 'auto' with more cards than the threshold) that publication ships NO cards:
// each list of an open board fetches its own window. A picker opens no board
// view, so nothing ever fetched its window and the card dropdown stayed empty
// for good. `destinationCards` publishes what a picker shows, whatever the
// board's card-loading mode: the title and place of each card of one list (or,
// for the parent-card picker, of the whole board), and nothing else.
import { listCardsSelector } from './swimlaneFilter.js';
// The fields a picker needs: the option text, the sort order, what
// list.cardsUnfiltered()'s selector tests in minimongo, and `type` / `linkedId`,
// with which the link-card picker leaves out linked cards and the cards it
// already mirrors. No description, no members, no assignees - a picker reveals
// no more than a minicard's title.
const DESTINATION_CARD_FIELDS = Object.freeze({
_id: 1,
title: 1,
sort: 1,
boardId: 1,
listId: 1,
swimlaneId: 1,
archived: 1,
type: 1,
linkedId: 1,
});
// A board's biggest list stays under this; it bounds what one subscribe asks
// of the database (the windowed publication's own cap is the same).
const MAX_DESTINATION_CARDS = 5000;
// The client half of the selector: one list's cards in one swimlane, exactly as
// list.cardsUnfiltered() selects them in minimongo (orphaned cards included in
// the first swimlane), or every active card of the board when no list is
// named. The server ANDs it with the board and role scope.
function destinationCardsSelector(listId, swimlaneId, otherSwimlaneIds) {
if (!listId) return { archived: false };
// The link-card picker names a list without a swimlane: the whole list.
return listCardsSelector(listId, swimlaneId || undefined, otherSwimlaneIds);
}
export { DESTINATION_CARD_FIELDS, MAX_DESTINATION_CARDS, destinationCardsSelector };
+17 -7
View File
@@ -1345,7 +1345,7 @@ export const copyFile = async function(fileObj, newCardId, fileStoreStrategyFact
})));
};
export const rename = function(fileObj, newName, fileStoreStrategyFactory) {
export const rename = async function(fileObj, newName, fileStoreStrategyFactory) {
// Sanitize the new name to prevent path traversal
const safeName = sanitizeFilename(newName);
@@ -1353,18 +1353,28 @@ export const rename = function(fileObj, newName, fileStoreStrategyFactory) {
const extension = lastDot === -1 ? '' : safeName.substring(lastDot + 1).toLowerCase();
const extensionWithDot = extension ? `.${extension}` : '';
Object.keys(fileObj.versions).forEach(versionName => {
for (const versionName of Object.keys(fileObj.versions)) {
const strategy = fileStoreStrategyFactory.getFileStrategy(fileObj, versionName);
const newFilePath = strategy.getNewPath(fileStoreStrategyFactory.storagePath, safeName);
strategy.rename(newFilePath);
(fileStoreStrategyFactory.collection || Attachments).updateAsync({ _id: fileObj._id }, { $set: {
// Upload hooks keep using this object and persist its versions again before
// validation. Keep it in sync with the renamed bytes and database record.
fileObj.versions[versionName].path = newFilePath;
const set = {
"name": safeName,
"extension": extension,
"extensionWithDot": extensionWithDot,
[`versions.${versionName}.path`]: newFilePath,
} }).catch(error => {
console.error('Failed to persist renamed attachment path:', error);
});
});
};
// Meteor-Files also records the original at the top level; the upload
// validator reads that path rather than versions.original.path.
if (versionName === 'original') {
fileObj.path = newFilePath;
set.path = newFilePath;
}
await (fileStoreStrategyFactory.collection || Attachments).updateAsync(
{ _id: fileObj._id }, { $set: set },
);
}
};
+450 -1
View File
@@ -14,7 +14,456 @@ Releases per day:
| 11 | 6 |
| 12 | 5 |
| 13 | 1 |
| 14 | 4 |
| 14 | 5 |
# v12.44 2026-10-14 WeKan ® release
**In short:** sign in with a **passkey** or **SQRL**, and **log out
everywhere**. **Browser push**, an **activity feed** and **ntfy** bring
notifications anywhere, and webhooks **direct-message** on **Mattermost**. Card
descriptions are **edited together, live**; cards can be **drawn on**, be
**Stories** or **Tasks**, and mark **unread changes**. Boards get **column
sets**, **linked lists** and a **Table view** that adds and drags cards, and
**All Boards** gives each team a tab. **Nextcloud** gets **CalDAV** sync and
**WebDAV** storage, public boards join the **fediverse**, and two **CodeQL**
alerts are fixed.
This release fixes the following SECURITY ISSUES found by GitHub CodeQL code scanning:
<details>
<summary><a href="https://github.com/wekan/wekan/commit/587efab82b">Two CodeQL alerts in a test, and every test pattern of the same shapes</a>. Thanks to GitHub CodeQL and xet7.</summary>
CodeQL alerts #584 (bad HTML filtering regexp) and #585 (incomplete regular
expression for hostnames), both in `tests/accountEmailHtml.test.cjs`: it
checked that the e-mail layout escapes markup with `/<img|<script|<b>/`, which
a `<SCRIPT>` passes, and made the reset address into a RegExp. It now lists
every tag of the output in any letter case and allows only the layout's own
`div`, `p`, `a` and `br`, and compares the address as text. The renderer was
already escaping them.
Both are pinned as shapes across the tree in
`tests/securityAlerts20261012.test.cjs`, which found more: a case-sensitive
`<script>` pattern in `jsWebLabels.test.cjs`, a path spliced into generated
code in `singleFile.test.cjs`, and twelve test patterns with a host name's dot
unescaped. These are in tests, so there is no attempt at runtime to record in
Admin Panel → Problems.
</details>
and adds the following new features:
**Sign-in** - how members sign in and out, and who is told.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/63ef900d56">Passkey login, and Log out everywhere</a>. Thanks to xet7.</summary>
Member Settings / Passkeys adds a passkey on this device under a name and
removes one; the sign-in page has "Sign in with a passkey", with no user name
needed. Verification is @simplewebauthn/server (pinned) against ROOT_URL's host
and origin, with a single-use challenge that expires in five minutes and a
signature counter that must move forward. Passkeys are never published. Log out
everywhere ends every session of the account, this one too.
`tests/passkeys.test.cjs` signs with a software authenticator and refuses
another key, origin, challenge or a counter that went back; a Meteor runtime
test checks the server loads. [Passkeys](docs/Features/Login/Passkeys.md).
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/ea256dd772">A login and registration webhook in the Admin Panel, off by default</a>. Thanks to KrunalDholakiya and xet7.</summary>
Admin Panel / Settings / Global Webhooks tells one address when somebody logs
in or an account is made, only for the ticked events. It carries the event,
the user name and the time; the email, IP address, full name and sign-in
method only when ticked. It is sent after the login, through the SSRF guard,
and is never published. `tests/accountWebhook.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/c940b3e301">Sign in with SQRL, from a phone or a computer</a>. Thanks to xet7.</summary>
[SQRL](https://www.grc.com/sqrl/sqrl.htm) signs in with a SQRL app or client
instead of a password, after a site admin turns it on (Admin Panel → Settings →
Visibility → Features, off by default). A member adds their identity once in
Member Settings → SQRL; the sign-in page then shows a `sqrl://` link and its QR
code and signs in by itself when the client has answered. WeKan keeps only the
identity's public keys, never published and not writable from the client.
Every nut is random and used once, each request must carry the server's
previous reply unchanged, and every request is checked with Ed25519 (Node.js's
own `crypto`). An unknown identity can neither make an account nor sign in;
disable, enable, remove and rekey follow the protocol, the last three only
with the rescue code's unlock key. `tests/sqrl.test.cjs` drives the real
handler with a software SQRL client, forged signatures, replays and altered
replies included, and `server/lib/tests/sqrl.tests.js` adds an identity and
signs in through the running server. Documented in
[SQRL.md](docs/Features/Login/SQRL.md).
</details>
**Notifications** - where they arrive and how they look.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/d873af70e8">ntfy phone notifications, per member</a>. Thanks to xet7.</summary>
Member Settings / Notification Settings takes a member's ntfy topic address
and token; each notification they get also arrives in the ntfy app, with a tap
opening the card. JSON publishing, through the SSRF guard, best effort, and the
topic is never published. `tests/ntfy.test.cjs`,
[ntfy](docs/Features/Notifications/ntfy.md).
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/058677e078">E-mails in the clear HTML layout by default</a>. Thanks to Meeques and xet7.</summary>
Notification e-mail defaults to the clearly arranged layout of \#5171, classic
one choice away; account e-mails (reset password, verify, new account,
invitations) get an HTML part built from the same translated text, everything
escaped and only http(s) linked. `tests/accountEmailHtml.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/349d6dc5e6">Webhooks can also direct-message the card's people on Mattermost</a>. Thanks to xet7.</summary>
A webhook's new tick sends each message about a card to its members and
assignees as `@username`, never to whoever made the change, at most 50.
`tests/mattermostDirectMessages.test.cjs`,
[Mattermost](docs/Features/Webhooks/Chat/Mattermost.md).
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/0a5ae3e205">Browser push notifications, per device</a>. Thanks to saurabharch, hingerl and xet7.</summary>
Member Settings → Notification Settings → Browser notifications on this
device: every notification the member gets also pops up from that browser,
even with WeKan closed, and a click opens the card. web-push 3.6.7 (pinned)
sends it with this WeKan's own VAPID keys. A subscription is accepted only over
https and only at the push services browsers use, checked when saved and
before every send. Not offered on Sandstorm.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/656af74b2c">An activity feed across all of a member's boards</a>. Thanks to xet7.</summary>
Member menu → Activity on all my boards lists what happened on every board the
member sees, newest first, 50 at a time, in the sentences the notifications
use. It never carries a field's value, follows the assigned-only rule, and is
empty when the Admin Panel turns activities off. `tests/activityFeed.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/c3321926ab">Webhooks: pick which activities a webhook is sent</a>. Thanks to xet7.</summary>
The webhook form gets "Send this webhook:" with Every activity and a tick per
kind of activity - the groups notifications are muted by. Nothing ticked stays
"all", so a webhook never silently gets nothing.
`tests/webhookActivityPicker.test.cjs`.
</details>
**Rules** - who sees them, and who their e-mails go to.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/f4a3690256">Board members can be shown the Rules, read-only</a>. Thanks to justinr1234 and xet7.</summary>
An Admin Panel option, off by default, lets board admins tick "Show these
Rules to board members, read-only"; members then read the rules list and
details with no control that changes them. Without both ticks only admins see
the Rules page. `tests/rulesReadOnly.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/75e260966b">Pick board members for a rule e-mail's To field</a>. Thanks to chenghongxi and xet7.</summary>
A member picker with autocomplete adds `@username`, which becomes that member's
current address when the rule runs; free addresses still work, and a name of
somebody outside the board is dropped. `tests/ruleEmailMembers.test.cjs`.
</details>
**Boards** - subtasks, teams and leaving a board.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/740c3920eb">Board Settings / Subtasks picks the swimlane new subtasks land in</a>. Thanks to BjoernLudwig and xet7.</summary>
Beside the landing list; unset keeps the parent's swimlane title, else the
default. `tests/subtaskLandingSwimlane.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/1acc9f2b9f">Leaving a board that came through a team hides it, restorably</a>. Thanks to LaureHades and xet7.</summary>
Such a board goes into the member's hidden list, out of All Boards, and Member
Settings / Hidden boards restores it; the team membership is untouched.
`tests/hiddenBoards.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/ed2649f702">A board admin may add only the organizations and teams they belong to</a>. Thanks to chrisi51 and xet7.</summary>
Site admins may add any; links already on a board stay, and removing is always
allowed. The pickers offer only the admin's own groups.
`tests/boardGroupLinks.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/2fd3993538">A linked whole list: a live mirror of another board's list</a>. Thanks to javen9881 and xet7.</summary>
The add-list form can link a list from another board: its cards appear live
and stay the source board's cards, under its rules, and a card typed into the
mirror is added to the source list only for somebody who may write there. The
cards are published only to a subscriber who sees both boards. No self links,
archived or foreign lists, or mirrors of mirrors. `tests/linkedList.test.cjs`.
</details>
**Cards and checklists** - kinds of card, subtasks from other boards, and
who does each checklist item.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/0d77882c3b">Story and Task cards, with custom fields of their own</a>. Thanks to nightwind27 and xet7.</summary>
Card menu / Card kind makes a card a Story or a Task, with a badge on the
minicard. A custom field limited to a kind is added to a card when it gets
that kind and shown only on cards of it. `tests/cardKinds.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/e9af50ff07">An existing card from another board as a subtask</a>. Thanks to TiibCD and xet7.</summary>
The existing-card picker gets a board picker; another board's card is
attached on the server, which checks write access to both boards and loops
through every parent. `tests/crossBoardSubtasks.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/7ca1489279">A person responsible for each checklist item, and dated items in the calendar and Gantt</a>. Thanks to martinbruno90 and xet7.</summary>
Each item gets a responsible board member. Items with a due date appear in
the calendar and both Gantt views as "card: item"; moving one moves only the
item's date. `tests/checklistItemSchedule.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/9138e85091">Edit a card description together, live</a>. Thanks to dalareo and xet7.</summary>
Everybody with a card's description open edits one shared Yjs document, so two
people typing at once both keep what they typed instead of the later Save
replacing the earlier. The editor stays the Markdown textarea, with the caret
kept where it was; Save writes the description as before. The document is
published only to people who may edit the card, merged with a conditional
write, size-limited and rate-limited, and started again when the description
changes some other way. yjs 13.6.33 (pinned). `tests/sharedDescription.test.cjs`
runs the real Yjs.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/c772769c0e">Draw or write by hand on a card, saved as PNG and SVG</a>. Thanks to aleroot and xet7.</summary>
Card menu → Drawing: draw with a mouse, pen or finger, undo and clear. The
strokes stay on the card so the drawing can be edited later, and a PNG is
uploaded as an attachment; Download as SVG builds the SVG from the strokes.
Only numbers and the allowed colours and widths reach the SVG.
`tests/cardDrawing.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/d8690a26f5">Cards changed since a member last opened them are marked</a>. Thanks to Lacour20, martinpospech and xet7.</summary>
Member Settings → Mark cards changed since I last opened them, off by default:
a minicard gets a blue edge when its fields, checklists, attachments or
comments changed after the member last opened it. Turning it on does not mark
every old card, and the member's own edits do not mark it.
`tests/unreadChanges.test.cjs`.
</details>
**Board views** - the Table and Swimlanes views.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/0a566dc9ac">The Table view adds cards, and moves them by dragging a row onto another</a>. Thanks to guakamole and xet7.</summary>
An add row under the table takes a title, list and swimlane, checked on the
server; dropping a row puts its card just before the target card.
`tests/tableViewDrop.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/9d95bda245">One shared, sticky list header row for all swimlanes</a>. Thanks to mikesutton and xet7.</summary>
A Board Settings / Swimlane setting, off by default: the first swimlane's list
headers stay at the top, through the existing sticky rule, and the others are
not repeated. `tests/sharedListHeaders.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/03d0144538">Column sets: the same cards in several named sets of columns</a>. Thanks to kentonv and xet7.</summary>
A new board view. A board keeps named column sets - say Completion, Priority,
Milestone - and every card is in one column of each set. Dragging a card moves
it only within the shown set, and each card shows its columns in the other sets
as coloured labels. Board admins make the sets; the Admin Panel can turn the
view off. Documented in [Column-Sets.md](docs/Features/Board/Column-Sets.md).
</details>
**All Boards** - finding boards among many.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/000bc1c490">Boards grouped by first character, organization, team and board label</a>. Thanks to xet7.</summary>
A facet bar shows each group with its count, and a click shows only that
group. Board labels are the member's own, applied to every board whose name
includes some text. `tests/allBoardsFacets.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/d04b8444a6">A tab per organization and team, where their admins manage members</a>. Thanks to xet7.</summary>
The left menu of All Boards gets a tab for each organization and team the
member is in, with its boards and its members. The group's admins and site
admins add and remove members there; a group that comes from LDAP or another
directory is read-only, because WeKan never writes directory groups back.
`tests/groupMembers.test.cjs`.
</details>
**Platforms** - phones, Sandstorm and free JavaScript.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/52b0ea0d81">Share to WeKan from other Android apps</a>. Thanks to memeplex and xet7.</summary>
The manifest's share target opens "Add to WeKan": pick a board and list and
what was shared becomes a card. The server checks the right to write in that
list. `tests/shareTarget.test.cjs`,
[Android](docs/Platforms/FOSS/OS/Android.md).
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/d1d806de2c">On Sandstorm, Copy card URL shares the card through Sandstorm</a>. Thanks to AlexanderZobkov and xet7.</summary>
It opens Sandstorm's Share Access dialog for the card's page, whose link opens
the grain there; elsewhere it copies as before. `tests/sandstormShare.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/631a7fdfe2">LibreJS license information for the browser bundle</a>. Thanks to alexgleason and xet7.</summary>
`/jslicense.html` is a JS Web Labels table of the scripts actually served, and
every page links it with `rel="jslicense"`. `tests/jsWebLabels.test.cjs`.
</details>
**Nextcloud and the fediverse** - calendars, files and followers outside WeKan.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/c76f3e2e98">CalDAV: card due dates in Nextcloud Calendar or any CalDAV calendar</a>. Thanks to scriptPilot and xet7.</summary>
Board Settings → Date → Calendar sync: each card with a due date is one event
in the chosen calendar, removed when the due date goes, and a due date moved in
the calendar comes back to the card every 15 minutes. The calendar's password
is never published and only a board admin sees the link; requests go through
the SSRF guard. `tests/caldavSync.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/4234081752">WebDAV attachment storage: Nextcloud Files or any WebDAV server</a>. Thanks to scriptPilot and xet7.</summary>
Admin Panel → Attachments → WebDAV (Nextcloud Files), beside S3, Azure and
Google Cloud Storage, with the same switches, connection test, default storage
and Move Attachment. The password is a secret field like the others, and
redirects are refused. With CalDAV this completes #687; the Nextcloud ExApp is
built by `.github/workflows/nextcloud.yml`. `tests/webdavStorage.test.cjs`.
</details>
<details>
<summary><a href="https://github.com/wekan/wekan/commit/bf633b9c72">ActivityPub: a public board can be followed from Mastodon</a>. Thanks to ASLLR and xet7.</summary>
Admin Panel → Settings → Visibility → Features → ActivityPub, off by default:
each public board is an actor, `@board-<id>` at this WeKan, and its new card
activity reaches its followers as signed Notes. It is read-only - only signed
Follow and Undo Follow are acted on - and a private board is never an actor.
Outgoing requests go through the SSRF guard. `tests/activityPub.test.cjs`.
</details>
and fixes the following bugs:
**Speed** - finding a card's subtasks.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/0c6c0c6021">Finding subtasks no longer scans every card</a>. Thanks to Raymond-Voogt and xet7.</summary>
Subtasks of several parents are found with `{ $or: [{ parentId }, { parentIds }]
}`,
and only `parentId` had an index - a `$or` uses indexes only when every branch
has one, so removing, copying and exporting cards scanned the whole collection.
`parentIds` has its own index now, and `tests/cardQueryIndexes.test.cjs`
requires
an index for every branch of every subtask `$or`.
</details>
**Startup** - a schema WeKan could not start with.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/d3966fa6b9">Story and Task cards no longer stop WeKan at startup</a>. Thanks to xet7.</summary>
The unreleased Story and Task commit declared `cardKinds` as `type: [String]`,
which the schema library refuses at startup. It is `type: Array` with a
`cardKinds.$` entry, and `tests/cardKinds.test.cjs` pins the form.
</details>
**Accessibility** - screen readers.
<details>
<summary><a href="https://github.com/wekan/wekan/commit/8d71c6f925">Every icon-only link and button has a name for screen readers</a>. Thanks to ndarilek and xet7.</summary>
21 controls showed only an icon and had no name: the drag handles, the inline
forms' close buttons, a card's date buttons, the notification drawer, History's
previous and next and others. Each has a translated title, which becomes its
`aria-label`, and `tests/iconOnlyControlLabels.test.cjs` scans every template
for an unnamed icon-only control. Part of #337.
</details>
and has the following developer-tooling and translation changes:
- [The new strings translated in all 234 locales](https://github.com/wekan/wekan/commit/fdc52787e1). Thanks to xet7.
- [The Mattermost, Share to WeKan, passkey and hidden board strings translated](https://github.com/wekan/wekan/commit/5409e059ae). Thanks to xet7.
- [The risk baseline allows the Sandstorm share helper's addresses](https://github.com/wekan/wekan/commit/a4727e6764). Thanks to xet7.
- [The cross-board subtask, checklist owner, shared header, facet and card kind strings translated](https://github.com/wekan/wekan/commit/946f032883). Thanks to xet7.
- [The push, linked-list, column-set, drawing and team-tab strings translated](https://github.com/wekan/wekan/commit/2b84e6b616). Thanks to xet7.
- [The ActivityPub, CalDAV and WebDAV strings, translated](https://github.com/wekan/wekan/commit/2c9df4db88). Thanks to xet7.
- [The SQRL strings translated](https://github.com/wekan/wekan/commit/b0e47537e0). Thanks to xet7.
- [A test pins the issue's own example of keeping #label and @member](https://github.com/wekan/wekan/commit/cd4c4ad9ce), which shipped in v12.43. Thanks to biji and xet7.
- [A guard skips every rspack output directory, not only _build](https://github.com/wekan/wekan/commit/5f2dd80f41). Thanks to xet7.
Thanks to above GitHub users for their contributions and translators for their translations.
# v12.43 2026-10-14 WeKan ® release
+186 -53
View File
@@ -1,12 +1,12 @@
{
"name": "wekan",
"version": "v13.12.0",
"version": "v13.14.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "wekan",
"version": "v13.12.0",
"version": "v13.14.0",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@@ -51,7 +51,7 @@
"highlight.js": "^11.12.0",
"hotkeys-js": "^4.0.8",
"htmlparser2": "^12.0.0",
"i18next": "^26.5.11",
"i18next": "^27.1.1",
"i18next-sprintf-postprocessor": "^0.2.2",
"imapflow": "2.9.1",
"isomorphic-git": "1.44.10",
@@ -70,7 +70,7 @@
"pdfkit": "^0.20.2",
"pretty-ms": "^10.0.0",
"qrcode-generator": "2.0.4",
"sanitize-html": "^2.18.1",
"sanitize-html": "^2.18.2",
"sharp": "^0.35.5",
"temml": "^0.14.0",
"underscore": "^1.13.8",
@@ -87,14 +87,14 @@
"@rspack/dev-server": "^2.2.2",
"@swc/core": "^1.16.18",
"@typescript-eslint/eslint-plugin": "^8.72.1",
"@typescript-eslint/parser": "^8.72.0",
"@typescript-eslint/parser": "^8.72.2",
"chai": "^6.3.0",
"chai-as-promised": "^8.0.2",
"css-loader": "^7.1.4",
"enhanced-resolve": "5.26.0",
"minimatch": "^11.0.1",
"mongodb": "^7.7.0",
"puppeteer": "^25.15.0",
"mongodb": "^7.8.0",
"puppeteer": "^25.17.0",
"sinon": "^22.1.0",
"sinon-chai": "^4.0.1",
"style-loader": "^4.0.0"
@@ -3661,13 +3661,13 @@
"license": "MIT"
},
"node_modules/@puppeteer/browsers": {
"version": "3.2.5",
"resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-3.2.5.tgz",
"integrity": "sha512-UoCo3Pynbm37aLEEoydSiG+t24ui7sLD40+07CKxzxNy4PpSowJMkvlLIiV67XjP1lMVynhQVnuwlTABqBH8LQ==",
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-3.2.7.tgz",
"integrity": "sha512-B3C/v8OEEaJYcN1IzzgbPmt+GbFANr4Mf/NrqNuGk/dIchrv6quNqxgT+A6qE0Ge0MN95NjKUddcR1JMpYRMWA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"modern-tar": "^0.8.5",
"modern-tar": "^0.8.6",
"yargs": "^18.0.0"
},
"bin": {
@@ -5485,16 +5485,16 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "8.72.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.72.1.tgz",
"integrity": "sha512-ZGwZP4OCfyA0AQTpEAMWz+rtX01DRhQWW5hB0ucKDEIX5U7jdmPSaMx94rQfaPAQzIYz2BimOgKOJtjfpRFQ9g==",
"version": "8.72.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.72.2.tgz",
"integrity": "sha512-llP+T1YuJOLlxEciP6OyQGtz5SMxyn+9LA2BvZw5RmToGVa1y4beEDVQL6Gje7T5WFYh19WREjDCN9Ev4gm5AA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/scope-manager": "8.72.1",
"@typescript-eslint/types": "8.72.1",
"@typescript-eslint/typescript-estree": "8.72.1",
"@typescript-eslint/visitor-keys": "8.72.1",
"@typescript-eslint/scope-manager": "8.72.2",
"@typescript-eslint/types": "8.72.2",
"@typescript-eslint/typescript-estree": "8.72.2",
"@typescript-eslint/visitor-keys": "8.72.2",
"debug": "^4.4.3"
},
"engines": {
@@ -5509,6 +5509,136 @@
"typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/project-service": {
"version": "8.72.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.72.2.tgz",
"integrity": "sha512-6y5dLTZdHhI8Eh3yIQ/bfQhRKwn5e+TpJj64o18Cngc0iW/BCrVvrr6zGYqXPnYH31u6YXAYiFh0+qxX5mybJw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/tsconfig-utils": "^8.72.2",
"@typescript-eslint/types": "^8.72.2",
"debug": "^4.4.3"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
"version": "8.72.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.72.2.tgz",
"integrity": "sha512-iIoMJ6/8c1/QpFNyFjU0d1YzPco4MsZjQw0k3V+vfzNWAFmUmvhlyMoYEoYYDQZXc+J6Gi1X5XcxlzW2taIIGQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.72.2",
"@typescript-eslint/visitor-keys": "8.72.2"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/tsconfig-utils": {
"version": "8.72.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.72.2.tgz",
"integrity": "sha512-+h3iCgZXuTNtoLXcnnjP12ZUHLMqoUcIHPfQrFEXTUqvb9dF8QK9b5nv5VtSo5fLkdHuks8ehbTzZj3rImAm9w==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
"version": "8.72.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.72.2.tgz",
"integrity": "sha512-Xfn37OLZx03+PCU7qWx9DTv2FCRh1E6fk2+wONeNY15HXIwtcwuveaSwVpGAUptkNmPQegRxW5JyRel9T7wrog==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
"version": "8.72.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.72.2.tgz",
"integrity": "sha512-pQEGqIK/cqEvKivVWaFLYpe7XYejFxfuAOi4mu1oAWFvIo36aRHI9esRFTUxcIy/z8N482RJyH+LpZB0ZIU7Ow==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/project-service": "8.72.2",
"@typescript-eslint/tsconfig-utils": "8.72.2",
"@typescript-eslint/types": "8.72.2",
"@typescript-eslint/visitor-keys": "8.72.2",
"debug": "^4.4.3",
"minimatch": "^10.2.2",
"semver": "^7.7.3",
"tinyglobby": "^0.2.15",
"ts-api-utils": "^2.5.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
"version": "8.72.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.72.2.tgz",
"integrity": "sha512-NAGrjn0Pitjqzq/GkgMC4kBYm233PQ8GffyQ9+kTA3AlNQYEzOf25EIM02BAHZv5FRJSpHpJk+OGUxVkOB93GQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.72.2",
"eslint-visitor-keys": "^5.0.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/parser/node_modules/eslint-visitor-keys": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
"integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",
"dev": true,
"license": "Apache-2.0",
"engines": {
"node": "^20.19.0 || ^22.13.0 || >=24"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
},
"node_modules/@typescript-eslint/project-service": {
"version": "8.72.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.72.1.tgz",
@@ -7546,9 +7676,9 @@
}
},
"node_modules/devtools-protocol": {
"version": "0.0.1696802",
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1696802.tgz",
"integrity": "sha512-FO5/SENfvc2K8wRnWQflKcwuoTH4dBkXCWTQ9ebIWtuX8JM5+ZvCotaEmkfh21pO7TvIKGTM3hG4xFiq9WTwmg==",
"version": "0.0.1717327",
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1717327.tgz",
"integrity": "sha512-3RDLDzyvv8XAYf1L+TL1og0EEk0eOW1Jn0yi88uG6Bj8fUKO1ZKfgNtwbJkqf5SWdPDS4VGEPxwdUWz78V6Xcg==",
"dev": true,
"license": "BSD-3-Clause"
},
@@ -9685,9 +9815,9 @@
}
},
"node_modules/i18next": {
"version": "26.5.11",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-26.5.11.tgz",
"integrity": "sha512-Wc0klBPKxqZ2tL2qdAnF8xvvnWgr1IMGSY2ikTiAvaFVbz7xiFARtkoU4RidBDw1SyziGROp0qxu6qnJ7l2Wug==",
"version": "27.1.1",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-27.1.1.tgz",
"integrity": "sha512-Qq3aJizS3RXQ30crhx9BKQLrHoa6GKpgrOJjVZ9vgj3EBxAddrmVfDNUrAMxSUimw5Jc+ld4SSZUAzf1q4nGyQ==",
"funding": [
{
"type": "individual",
@@ -9703,6 +9833,9 @@
}
],
"license": "MIT",
"engines": {
"node": ">=22"
},
"peerDependencies": {
"typescript": "^5 || ^6 || ^7"
},
@@ -10968,9 +11101,9 @@
}
},
"node_modules/lilconfig": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz",
"integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==",
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.5.tgz",
"integrity": "sha512-aRAOI9Ia43ygL4o1EOmC/sc/0OFxrm7qcQngiIyWaqVnSnz932ybJ07zyCcgMNGSDP8Yxaf88Xj1zHEXmvQ4SA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -12872,9 +13005,9 @@
}
},
"node_modules/mongodb": {
"version": "7.7.0",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-7.7.0.tgz",
"integrity": "sha512-XG1xXEqyouAV8GCb3PuRaujofeXKpAJAPvXYWZgHl6Dz4QHSJ1nRLl0+GpqaLTwKvC0RFE9truOur34RNFY1nw==",
"version": "7.8.0",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-7.8.0.tgz",
"integrity": "sha512-p2NKagbQ41+daACG/ZSvhTzeAo+DoEyWE9Cmpf/SyP3pTC43+X0mwKE/44PpKtCxp5wOxnXz+t2pXEZRSkt9Yg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -13833,18 +13966,18 @@
}
},
"node_modules/puppeteer": {
"version": "25.15.0",
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-25.15.0.tgz",
"integrity": "sha512-b+2Ye8C55Fi1u+w680WdDx4QWE4NVM1MKpB8YRXkbBngf335e/omAKI5/lPTSaAMmqHw199eEf90iFXPjJUYCw==",
"version": "25.17.0",
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-25.17.0.tgz",
"integrity": "sha512-J+OQNlI7I6ZjHhF6Q8M+LgiUGldF7meer5EqMJBZMHgnFN3zcehOhpz/x0bYDEEvbEiXzKzmqSRP3QT+5accjQ==",
"dev": true,
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
"@puppeteer/browsers": "3.2.5",
"@puppeteer/browsers": "3.2.7",
"chromium-bidi": "157.0.8090-0",
"devtools-protocol": "0.0.1696802",
"lilconfig": "^3.1.3",
"puppeteer-core": "25.15.0",
"devtools-protocol": "0.0.1717327",
"lilconfig": "^3.1.4",
"puppeteer-core": "25.17.0",
"typed-query-selector": "^2.12.3"
},
"bin": {
@@ -13855,18 +13988,18 @@
}
},
"node_modules/puppeteer-core": {
"version": "25.15.0",
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-25.15.0.tgz",
"integrity": "sha512-DEk7S2tlBDp4+iXdnHjFmMofoqVftlz1JO4eyE+oBSiQIfIVTYq8hWF1EsjmRvD49chxGX3oKQT5hX2dnIIDdg==",
"version": "25.17.0",
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-25.17.0.tgz",
"integrity": "sha512-YAgBitkd+K9gxRt+wzBAFTTkGjkC8aC2o4OxofsU8JUy2nnK/RflTCJ9bRCvCMNbq9TPhqFk4Phz98otN9FrGg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@puppeteer/browsers": "3.2.5",
"@puppeteer/browsers": "3.2.7",
"chromium-bidi": "157.0.8090-0",
"devtools-protocol": "0.0.1696802",
"devtools-protocol": "0.0.1717327",
"typed-query-selector": "^2.12.3",
"webdriver-bidi-protocol": "1.0.1",
"ws": "^8.22.0"
"webdriver-bidi-protocol": "1.0.2",
"ws": "^8.22.1"
},
"engines": {
"node": ">=22.12.0"
@@ -14417,9 +14550,9 @@
"license": "MIT"
},
"node_modules/sanitize-html": {
"version": "2.18.1",
"resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.18.1.tgz",
"integrity": "sha512-2X5lC8fYla8YaT8g73Nj+HcLWXan5dLyCWLgVvaOmfw7JI78IRsyNtIDytTHdn7hBQbIkCah7Zbmd5jabzeDig==",
"version": "2.18.2",
"resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.18.2.tgz",
"integrity": "sha512-LTQVNHBeKB5qIae9x2J2Fw68ORnES++8vzYaG7DFT8P4GVCJFeHffHnRUzf5Mrxfx+4GweIvMRqkBPHHodaVNg==",
"license": "MIT",
"dependencies": {
"escape-string-regexp": "^4.0.0",
@@ -16101,9 +16234,9 @@
}
},
"node_modules/webdriver-bidi-protocol": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-1.0.1.tgz",
"integrity": "sha512-WXWs/aXF2a6Al1Z2/V/7Gp2oPZOAAmHjJOTmv4KCXRJ122IMj3tSSMc6a4q3K4QOmhQbse/Ahr+oTVJOU2dUiw==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-1.0.2.tgz",
"integrity": "sha512-nghazPI+J5RrLZ+qb6vMjC6l1/tnwqr2muVEax4Ufd6eIdcjeqNnhLsAxTG9s+7Zf4umgf0DrEwDC8CoU91nAA==",
"dev": true,
"license": "Apache-2.0"
},
@@ -16371,9 +16504,9 @@
"license": "ISC"
},
"node_modules/ws": {
"version": "8.22.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.22.0.tgz",
"integrity": "sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==",
"version": "8.22.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.22.2.tgz",
"integrity": "sha512-/rEZ2ejown2N5gxVTHUu9bVVC7ttu0/Tgzf5hbTOixR3Fs7mbbXgn2DbdbcKgJOmpQMtrIUWivtYuVMnp/W/yA==",
"dev": true,
"license": "MIT",
"engines": {
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "wekan",
"version": "v13.12.0",
"version": "v13.14.0",
"description": "Open-Source kanban",
"private": true,
"repository": {
@@ -45,14 +45,14 @@
"@rspack/dev-server": "^2.2.2",
"@swc/core": "^1.16.18",
"@typescript-eslint/eslint-plugin": "^8.72.1",
"@typescript-eslint/parser": "^8.72.0",
"@typescript-eslint/parser": "^8.72.2",
"chai": "^6.3.0",
"chai-as-promised": "^8.0.2",
"css-loader": "^7.1.4",
"enhanced-resolve": "5.26.0",
"minimatch": "^11.0.1",
"mongodb": "^7.7.0",
"puppeteer": "^25.15.0",
"mongodb": "^7.8.0",
"puppeteer": "^25.17.0",
"sinon": "^22.1.0",
"sinon-chai": "^4.0.1",
"style-loader": "^4.0.0"
@@ -99,7 +99,7 @@
"highlight.js": "^11.12.0",
"hotkeys-js": "^4.0.8",
"htmlparser2": "^12.0.0",
"i18next": "^26.5.11",
"i18next": "^27.1.1",
"i18next-sprintf-postprocessor": "^0.2.2",
"imapflow": "2.9.1",
"isomorphic-git": "1.44.10",
@@ -118,7 +118,7 @@
"pdfkit": "^0.20.2",
"pretty-ms": "^10.0.0",
"qrcode-generator": "2.0.4",
"sanitize-html": "^2.18.1",
"sanitize-html": "^2.18.2",
"sharp": "^0.35.5",
"temml": "^0.14.0",
"underscore": "^1.13.8",
+3 -3
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="utf8" />
<title>WeKan REST API v13.12</title>
<title>WeKan REST API v13.14</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
@@ -494,11 +494,11 @@ data-styled.g652[id="sc-LDhwn"]{content:"cirFq,"}/*!sc*/
<body>
<div id="redoc"><div class="sc-jlWaFk kDulYG redoc light" style="--navbar-height:0px;--navbar-stack-height:0px"><div hidden=""><script>try{var r=document.querySelectorAll(".redoc");r=r[r.length-1];var h=document.documentElement,p=h.classList,a=[h.getAttribute("data-bs-theme"),h.getAttribute("data-theme")];var m=p.contains("dark")||a.indexOf("dark")>-1?"dark":p.contains("light")||a.indexOf("light")>-1?"light":localStorage.getItem("redoc.colorMode");if(m!=="light"&&m!=="dark")m=matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";r.classList.remove("light","dark");r.classList.add(m)}catch(e){}</script></div><div class="sc-NPrTd fpSCXb menu-content"><div class="sc-bJapvR eXtYur"><div data-testid="search-trigger" class="sc-eavxOQ bStpwo"><div class="sc-dGYDtq hRGWCd"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" data-component-name="icons/SearchIcon/SearchIcon" class="sc-gJaedx dpfGSp"><path d="M14.5 13.7931L10.724 10.017C11.6313 8.9277 12.0838 7.5305 11.9872 6.11608C11.8907 4.70165 11.2525 3.37891 10.2055 2.423C9.15857 1.4671 7.78336 0.951637 6.36602 0.983845C4.94867 1.01605 3.5983 1.59345 2.59582 2.59593C1.59335 3.5984 1.01595 4.94877 0.983738 6.36612C0.95153 7.78347 1.46699 9.15867 2.4229 10.2057C3.3788 11.2526 4.70155 11.8908 6.11597 11.9873C7.53039 12.0839 8.92759 11.6314 10.0169 10.7241L13.793 14.5001L14.5 13.7931ZM2.00001 6.50012C2.00001 5.6101 2.26393 4.74007 2.7584 4.00005C3.25286 3.26003 3.95567 2.68325 4.77794 2.34266C5.6002 2.00207 6.505 1.91295 7.37792 2.08658C8.25083 2.26022 9.05266 2.6888 9.68199 3.31814C10.3113 3.94747 10.7399 4.7493 10.9135 5.62221C11.0872 6.49513 10.9981 7.39993 10.6575 8.22219C10.3169 9.04446 9.7401 9.74726 9.00008 10.2417C8.26006 10.7362 7.39003 11.0001 6.50001 11.0001C5.30694 10.9988 4.16312 10.5243 3.31949 9.68064C2.47587 8.83701 2.00133 7.69319 2.00001 6.50012Z"></path></svg><span>Loading...</span></div></div></div><div class="sc-kLsiYl kAUzfx"><ul data-component-name="Menu/Menu" class="sc-jfJzNu hoWuXt"><div data-component-name="Menu/MenuItem" class="sc-jEekwy kJsUv menu-item-type-default" role="listitem"><a class="sc-gzhUzI kKmXTr" href="/" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="true" class="sc-cToEys eWEtkC"><div class="sc-fIruOr dBwuTA"><span class="sc-gwVKcS efjekG"><span data-text="WeKan REST API" class="sc-hgJgCR dWgUkd">WeKan REST API</span></span></div></li></a></div><div data-component-name="Menu/MenuItem" class="sc-jEekwy kJsUv menu-item-type-default" role="listitem"><a class="sc-gzhUzI kKmXTr" href="/section/production-security-concerns" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-cToEys iVTRMP"><div class="sc-fIruOr dBwuTA"><span class="sc-gwVKcS efjekG"><span data-text="Production Security Concerns" class="sc-hgJgCR dlVNdD">Production Security Concerns</span></span></div></li></a></div><div data-component-name="Menu/MenuItem" class="sc-jEekwy kJsUv menu-item-type-group" role="listitem"><a class="sc-gzhUzI kKmXTr" href="/login" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-cToEys jYycQW"><div class="sc-dGPMcj PCvEP"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-default" data-component-name="icons/ChevronRightIcon/ChevronRightIcon" class="sc-kLEbxe eRqACJ"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-fIruOr dBwuTA"><span class="sc-gwVKcS efjekG"><span data-text="Login" class="sc-hgJgCR dlVNdD">Login</span></span></div></li></a><div style="display:none;height:0px;overflow:hidden" class="sc-fKDFlh joxUYR"></div></div><div data-component-name="Menu/MenuItem" class="sc-jEekwy kJsUv menu-item-type-group" role="listitem"><a class="sc-gzhUzI kKmXTr" href="/attachmentstoragesettings" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-cToEys jYycQW"><div class="sc-dGPMcj PCvEP"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-default" data-component-name="icons/ChevronRightIcon/ChevronRightIcon" class="sc-kLEbxe eRqACJ"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-fIruOr dBwuTA"><span class="sc-gwVKcS efjekG"><span data-text="AttachmentStorageSettings" class="sc-hgJgCR dlVNdD">AttachmentStorageSettings</span></span></div></li></a><div style="display:none;height:0px;overflow:hidden" class="sc-fKDFlh joxUYR"></div></div><div data-component-name="Menu/MenuItem" class="sc-jEekwy kJsUv menu-item-type-group" role="listitem"><a class="sc-gzhUzI kKmXTr" href="/settings" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-cToEys jYycQW"><div class="sc-dGPMcj PCvEP"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-defLine truncated
<div id="redoc"><div class="sc-jlWaFk kDulYG redoc light" style="--navbar-height:0px;--navbar-stack-height:0px"><div hidden=""><script>try{var r=document.querySelectorAll(".redoc");r=r[r.length-1];var h=document.documentElement,p=h.classList,a=[h.getAttribute("data-bs-theme"),h.getAttribute("data-theme")];var m=p.contains("dark")||a.indexOf("dark")>-1?"dark":p.contains("light")||a.indexOf("light")>-1?"light":localStorage.getItem("redoc.colorMode");if(m!=="light"&&m!=="dark")m=matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";r.classList.remove("light","dark");r.classList.add(m)}catch(e){}</script></div><div class="sc-NPrTd fpSCXb menu-content"><div class="sc-bJapvR eXtYur"><div data-testid="search-trigger" class="sc-eavxOQ bStpwo"><div class="sc-dGYDtq hRGWCd"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" data-component-name="icons/SearchIcon/SearchIcon" class="sc-gJaedx dpfGSp"><path d="M14.5 13.7931L10.724 10.017C11.6313 8.9277 12.0838 7.5305 11.9872 6.11608C11.8907 4.70165 11.2525 3.37891 10.2055 2.423C9.15857 1.4671 7.78336 0.951637 6.36602 0.983845C4.94867 1.01605 3.5983 1.59345 2.59582 2.59593C1.59335 3.5984 1.01595 4.94877 0.983738 6.36612C0.95153 7.78347 1.46699 9.15867 2.4229 10.2057C3.3788 11.2526 4.70155 11.8908 6.11597 11.9873C7.53039 12.0839 8.92759 11.6314 10.0169 10.7241L13.793 14.5001L14.5 13.7931ZM2.00001 6.50012C2.00001 5.6101 2.26393 4.74007 2.7584 4.00005C3.25286 3.26003 3.95567 2.68325 4.77794 2.34266C5.6002 2.00207 6.505 1.91295 7.37792 2.08658C8.25083 2.26022 9.05266 2.6888 9.68199 3.31814C10.3113 3.94747 10.7399 4.7493 10.9135 5.62221C11.0872 6.49513 10.9981 7.39993 10.6575 8.22219C10.3169 9.04446 9.7401 9.74726 9.00008 10.2417C8.26006 10.7362 7.39003 11.0001 6.50001 11.0001C5.30694 10.9988 4.16312 10.5243 3.31949 9.68064C2.47587 8.83701 2.00133 7.69319 2.00001 6.50012Z"></path></svg><span>Loading...</span></div></div></div><div class="sc-kLsiYl kAUzfx"><ul data-component-name="Menu/Menu" class="sc-jfJzNu hoWuXt"><div data-component-name="Menu/MenuItem" class="sc-jEekwy kJsUv menu-item-type-default" role="listitem"><a class="sc-gzhUzI kKmXTr" href="/" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="true" class="sc-cToEys eWEtkC"><div class="sc-fIruOr dBwuTA"><span class="sc-gwVKcS efjekG"><span data-text="WeKan REST API" class="sc-hgJgCR dWgUkd">WeKan REST API</span></span></div></li></a></div><div data-component-name="Menu/MenuItem" class="sc-jEekwy kJsUv menu-item-type-default" role="listitem"><a class="sc-gzhUzI kKmXTr" href="/section/production-security-concerns" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-cToEys iVTRMP"><div class="sc-fIruOr dBwuTA"><span class="sc-gwVKcS efjekG"><span data-text="Production Security Concerns" class="sc-hgJgCR dlVNdD">Production Security Concerns</span></span></div></li></a></div><div data-component-name="Menu/MenuItem" class="sc-jEekwy kJsUv menu-item-type-group" role="listitem"><a class="sc-gzhUzI kKmXTr" href="/login" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-cToEys jYycQW"><div class="sc-dGPMcj PCvEP"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-default" data-component-name="icons/ChevronRightIcon/ChevronRightIcon" class="sc-kLEbxe eRqACJ"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-fIruOr dBwuTA"><span class="sc-gwVKcS efjekG"><span data-text="Login" class="sc-hgJgCR dlVNdD">Login</span></span></div></li></a><div style="display:none;height:0px;overflow:hidden" class="sc-fKDFlh joxUYR"></div></div><div data-component-name="Menu/MenuItem" class="sc-jEekwy kJsUv menu-item-type-group" role="listitem"><a class="sc-gzhUzI kKmXTr" href="/attachmentstoragesettings" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-cToEys jYycQW"><div class="sc-dGPMcj PCvEP"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-default" data-component-name="icons/ChevronRightIcon/ChevronRightIcon" class="sc-kLEbxe eRqACJ"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-fIruOr dBwuTA"><span class="sc-gwVKcS efjekG"><span data-text="AttachmentStorageSettings" class="sc-hgJgCR dlVNdD">AttachmentStorageSettings</span></span></div></li></a><div style="display:none;height:0px;overflow:hidden" class="sc-fKDFlh joxUYR"></div></div><div data-component-name="Menu/MenuItem" class="sc-jEekwy kJsUv menu-item-type-group" role="listitem"><a class="sc-gzhUzI kKmXTr" href="/settings" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-cToEys jYycQW"><div class="sc-dGPMcj PCvEP"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-defLine truncated
<script type="module">
import { hydrate } from "https://cdn.redocly.com/redoc/v3.1.0/bundles/redoc.standalone.js";
const __redoc_definition = {"openapi":"3.2.0","info":{"title":"WeKan REST API","version":"v13.12","description":"The REST API allows you to control and extend WeKan with ease.\n\nIf you are an end-user and not a dev or a tester, [create an issue](https://github.com/wekan/wekan/issues/new) to request new APIs.\n\n> All API calls in the documentation are made using `curl`. However, you are free to use Java / Python / PHP / Golang / Ruby / Swift / Objective-C / Rust / Scala / C# or any other programming languages.\n\n# Production Security Concerns\nWhen calling a production WeKan server, ensure it is running via HTTPS and has a valid SSL Certificate. The login method requires you to post your username and password in plaintext, which is why we highly suggest only calling the REST login api over HTTPS. Also, few things to note:\n\n* Only call via HTTPS\n* Implement a timed authorization token expiration strategy\n* Ensure the calling user only has permissions for what they are calling and no more\n"},"paths":{"/users/login":{"post":{"operationId":"login","summary":"Login with REST API","tags":["Login"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"description":"Your username\n","type":"string"},"password":{"description":"Your password\n","type":"string","format":"password"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"description":"Your username\n","type":"string"},"password":{"description":"Your password\n","type":"string","format":"password"}}}}},"description":"Login credentials","required":true},"responses":{"200":{"description":"Successful authentication","content":{"*/*":{"schema":{"type":"object","required":["id","token","tokenExpires"],"properties":{"id":{"type":"string","description":"User ID"},"token":{"type":"string","description":"Authentication token\n"},"tokenExpires":{"type":"string","format":"date-time","description":"Token expiration date\n"}}}}}},"400":{"description":"Error in authentication\n","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"reason":{"type":"string"}}}}}},"default":{"description":"Error in authentication\n"}}}},"/users/register":{"post":{"operationId":"register","summary":"Register with REST API","description":"Notes:\n - You will need to provide the token for any of the authenticated methods.\n","tags":["Login"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"username":{"description":"Your username\n","type":"string"},"password":{"description":"Your password\n","type":"string","format":"password"},"email":{"description":"Your email\n","type":"string"}},"required":["username","password","email"]}}},"required":true},"responses":{"200":{"description":"Successful registration","content":{"*/*":{"schema":{"items":{"properties":{"id":{"type":"string"},"token":{"type":"string"},"tokenExpires":{"type":"string"}}}}}}},"400":{"description":"Error in registration\n","content":{"*/*":{"schema":{"items":{"properties":{"error":{"type":"number"},"reason":{"type":"string"}}}}}}},"default":{"description":"Error in registration\n"}}}},"/api/admin/attachment-settings":{"get":{"operationId":"get_attachment_settings","summary":"Get the attachment storage / upload-block settings (GlobalAdmin)","description":"Only the global admin can call this. Returns the Admin Panel >\n Attachments settings document, including `limitSettings.attachmentsUploadBlocked`\n and `limitSettings.avatarsUploadBlocked` plus the size limits. Cloud-storage\n secret keys (S3 secretAccessKey, Azure accountKey/connectionString, GCS\n credentials) are masked and never returned; a boolean `\u003cfield>Set` marker\n shows whether a value exists.\n","tags":["AttachmentStorageSettings","Settings"],"security":[{"UserSecurity":[]}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"Object"}}}}}},"put":{"operationId":"update_attachment_settings","summary":"Update the attachment storage / upload-block settings (GlobalAdmin)","description":"Only the global admin can call this. The request body is a\n partial settings object (for example\n `{\"limitSettings\": {\"avatarsUploadBlocked\": true}}`). It is applied through\n the same update path as the `updateAttachmentStorageSettings` Meteor method,\n so validation and `$set` semantics are identical: cloud-storage secrets left\n blank are preserved. The masked, updated settings document is returned.\n","tags":["AttachmentStorageSettings","Settings"],"security":[{"UserSecurity":[]}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"Object"}}}}}}},"/api/admin/domains":{"get":{"operationId":"get_admin_domains","summary":"List email domains with their user counts (GlobalAdmin)","description":"Only the global admin can call this. CountsLine truncated
const __redoc_definition = {"openapi":"3.2.0","info":{"title":"WeKan REST API","version":"v13.14","description":"The REST API allows you to control and extend WeKan with ease.\n\nIf you are an end-user and not a dev or a tester, [create an issue](https://github.com/wekan/wekan/issues/new) to request new APIs.\n\n> All API calls in the documentation are made using `curl`. However, you are free to use Java / Python / PHP / Golang / Ruby / Swift / Objective-C / Rust / Scala / C# or any other programming languages.\n\n# Production Security Concerns\nWhen calling a production WeKan server, ensure it is running via HTTPS and has a valid SSL Certificate. The login method requires you to post your username and password in plaintext, which is why we highly suggest only calling the REST login api over HTTPS. Also, few things to note:\n\n* Only call via HTTPS\n* Implement a timed authorization token expiration strategy\n* Ensure the calling user only has permissions for what they are calling and no more\n"},"paths":{"/users/login":{"post":{"operationId":"login","summary":"Login with REST API","tags":["Login"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"description":"Your username\n","type":"string"},"password":{"description":"Your password\n","type":"string","format":"password"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"description":"Your username\n","type":"string"},"password":{"description":"Your password\n","type":"string","format":"password"}}}}},"description":"Login credentials","required":true},"responses":{"200":{"description":"Successful authentication","content":{"*/*":{"schema":{"type":"object","required":["id","token","tokenExpires"],"properties":{"id":{"type":"string","description":"User ID"},"token":{"type":"string","description":"Authentication token\n"},"tokenExpires":{"type":"string","format":"date-time","description":"Token expiration date\n"}}}}}},"400":{"description":"Error in authentication\n","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"reason":{"type":"string"}}}}}},"default":{"description":"Error in authentication\n"}}}},"/users/register":{"post":{"operationId":"register","summary":"Register with REST API","description":"Notes:\n - You will need to provide the token for any of the authenticated methods.\n","tags":["Login"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"username":{"description":"Your username\n","type":"string"},"password":{"description":"Your password\n","type":"string","format":"password"},"email":{"description":"Your email\n","type":"string"}},"required":["username","password","email"]}}},"required":true},"responses":{"200":{"description":"Successful registration","content":{"*/*":{"schema":{"items":{"properties":{"id":{"type":"string"},"token":{"type":"string"},"tokenExpires":{"type":"string"}}}}}}},"400":{"description":"Error in registration\n","content":{"*/*":{"schema":{"items":{"properties":{"error":{"type":"number"},"reason":{"type":"string"}}}}}}},"default":{"description":"Error in registration\n"}}}},"/api/admin/attachment-settings":{"get":{"operationId":"get_attachment_settings","summary":"Get the attachment storage / upload-block settings (GlobalAdmin)","description":"Only the global admin can call this. Returns the Admin Panel >\n Attachments settings document, including `limitSettings.attachmentsUploadBlocked`\n and `limitSettings.avatarsUploadBlocked` plus the size limits. Cloud-storage\n secret keys (S3 secretAccessKey, Azure accountKey/connectionString, GCS\n credentials) are masked and never returned; a boolean `\u003cfield>Set` marker\n shows whether a value exists.\n","tags":["AttachmentStorageSettings","Settings"],"security":[{"UserSecurity":[]}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"Object"}}}}}},"put":{"operationId":"update_attachment_settings","summary":"Update the attachment storage / upload-block settings (GlobalAdmin)","description":"Only the global admin can call this. The request body is a\n partial settings object (for example\n `{\"limitSettings\": {\"avatarsUploadBlocked\": true}}`). It is applied through\n the same update path as the `updateAttachmentStorageSettings` Meteor method,\n so validation and `$set` semantics are identical: cloud-storage secrets left\n blank are preserved. The masked, updated settings document is returned.\n","tags":["AttachmentStorageSettings","Settings"],"security":[{"UserSecurity":[]}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"Object"}}}}}}},"/api/admin/domains":{"get":{"operationId":"get_admin_domains","summary":"List email domains with their user counts (GlobalAdmin)","description":"Only the global admin can call this. CountsLine truncated
const __redoc_options = {"skipBundle":true,"disableTelemetry":false};
hydrate(__redoc_definition, __redoc_options, document.getElementById('redoc'));
+1 -1
View File
@@ -1,7 +1,7 @@
swagger: '2.0'
info:
title: WeKan REST API
version: v13.12
version: v13.14
description: |
The REST API allows you to control and extend WeKan with ease.
+2 -2
View File
@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
appTitle = (defaultText = "Wekan"),
# The name of the app as it is displayed to the user.
appVersion = 1312,
appVersion = 1314,
# Increment this for every release.
appMarketingVersion = (defaultText = "13.12~2026-11-14"),
appMarketingVersion = (defaultText = "13.14~2026-11-16"),
# Human-readable presentation of the app version.
minUpgradableAppVersion = 0,
+5
View File
@@ -208,6 +208,11 @@ require(path.join(tool, "tools/utils/fiber-helpers")).makeGlobalAsyncLocalStorag
const resolve = Module._resolveFilename;
Module._resolveFilename = function (id, parent, ...args) {
if (id.startsWith('meteor/') && Package[id.slice(7)]) return path.join(state, 'meteor', id.slice(7) + '.js');
// `meteor/<package>/main` (server/main.js loads aldeed:collection2 that
// way, before the models) names the package's main module. image.load
// above already ran every package, so it is the same exports object.
const mainModule = /^meteor\/([^/]+)\/main$/.exec(id);
if (mainModule && Package[mainModule[1]]) return path.join(state, 'meteor', mainModule[1] + '.js');
if (id.startsWith('/') && !id.startsWith(root + '/') && (fs.existsSync(root + id) || fs.existsSync(root + id + '.js'))) id = root + id;
return resolve.call(this, id, parent, ...args);
};
+3 -1
View File
@@ -16,6 +16,7 @@ import Swimlanes from '/models/swimlanes';
import Boards from '/models/boards';
import { ReactiveCache } from '/imports/reactiveCache';
import { visibleAllBoards } from '/server/allBoardsFacets';
const { notCurrentUser } = require('/server/lib/notCurrentUser');
const { isAssignedOnlyMember } = require('/models/lib/boardCardScope');
@@ -144,7 +145,8 @@ Meteor.publish('chatViewCardComments', async function (cardId) {
if (isAssignedOnlyMember(board, this.userId) && !(card.assignees || []).includes(this.userId)) return this.ready();
const comments = CardComments.find({ cardId, boardId: card.boardId });
const authors = [...new Set((await comments.fetchAsync()).map(c => c.userId).filter(Boolean))];
return [comments, Meteor.users.find({ _id: { $in: authors } },
// #6919: never the current user - see server/lib/notCurrentUser.js.
return [comments, Meteor.users.find(notCurrentUser({ _id: { $in: authors } }, this.userId),
{ fields: { username: 1, 'profile.fullname': 1, 'profile.avatarUrl': 1, 'profile.initials': 1 } })];
});
+20
View File
@@ -0,0 +1,20 @@
'use strict';
// #6919: a publication that sends users with only a few `profile.*` fields must
// never send the CURRENT user. DDP merges only top-level fields, so such a
// publication competes with the accounts publication of the user's whole
// profile; Meteor re-runs named subscriptions before the accounts one on every
// login - a reconnect included - and the narrow one then wins. The client's
// profile shrank to those few fields until the page was reloaded, and every
// preference in it went back to its default: a checklist folded on a minicard
// unfolded half a second later, and #6691 had found the same for the board
// view. The current user's own document is published in full already (and its
// other top-level fields by `user-admin`), so leaving it out loses nothing.
// tests/noNarrowProfileForCurrentUser6919.test.cjs finds every such
// publication and requires this.
function notCurrentUser(selector, userId) {
if (!userId) return selector;
return { $and: [selector || {}, { _id: { $ne: userId } }] };
}
module.exports = { notCurrentUser };
+1 -1
View File
@@ -38,7 +38,7 @@ async function correctBatch(collection, factory, limit) {
const { name, changed, detectedMime } = await correctedNameForStoredFile(fileObj, factory);
if (changed && name) {
const from = fileObj.name;
rename(fileObj, name, factory);
await rename(fileObj, name, factory);
result.corrected++;
if (result.examples.length < 20) {
result.examples.push({ from, to: name });
+12 -7
View File
@@ -258,27 +258,32 @@ WebApp.handlers.put(
// The item has to be one of this board's field's items: the update below
// matches nothing otherwise, and that was answered 200.
const field = await ReactiveCache.getCustomField({ _id: paramCustomFieldId, boardIds: { $in: [paramBoardId] } });
if (!field || !((field.settings && field.settings.dropdownItems) || []).some(item => item && item._id === paramDropdownItemId)) {
const itemIndex = ((field && field.settings && field.settings.dropdownItems) || []).findIndex(item => item && item._id === paramDropdownItemId);
if (itemIndex === -1) {
sendJsonResult(res, { code: 404, data: { error: 'Dropdown item not found' } });
return;
}
if (Object.prototype.hasOwnProperty.call(req.body, 'name')) {
await CustomFields.direct.updateAsync(
// An explicit index also works when validation previews the modifier
// without positional match information. Match the ID at that index so
// a concurrent removal/reorder cannot rename a different option.
const updated = await CustomFields.direct.updateAsync(
{
_id: paramCustomFieldId,
boardIds: { $in: [paramBoardId] },
'settings.dropdownItems._id': paramDropdownItemId,
[`settings.dropdownItems.${itemIndex}._id`]: paramDropdownItemId,
},
{
$set: {
'settings.dropdownItems.$': {
_id: paramDropdownItemId,
name: paramName,
},
[`settings.dropdownItems.${itemIndex}.name`]: paramName,
},
},
);
if (updated === 0) {
sendJsonResult(res, { code: 404, data: { error: 'Dropdown item not found' } });
return;
}
}
sendJsonResult(res, {
+5 -7
View File
@@ -84,14 +84,12 @@ if (Meteor.isServer) {
// http(s) URL, a data:image URI, an empty value (clearing), or a WeKan-local
// relative path (e.g. /cdn/storage/avatars/…). Reject javascript:, data:text/html,
// file:, protocol-relative //host and every other active/foreign scheme at write
// time so a hostile scheme can never be stored.
// time. The rule is models/lib/avatarUrlScheme.js, which the Users deny rule
// (server/permissions/users.js) applies to a direct client write too.
function assertSafeAvatarUrl(avatarUrl) {
if (avatarUrl === '') return;
if (avatarUrl.startsWith('/') && !avatarUrl.startsWith('//')) return;
const m = /^([a-z][a-z0-9+.\-]*):/i.exec(avatarUrl);
const scheme = m ? m[1].toLowerCase() : '';
if (scheme === 'http' || scheme === 'https') return;
if (scheme === 'data' && /^data:image\//i.test(avatarUrl)) return;
const { isStorableAvatarUrl, avatarUrlScheme } = require('/models/lib/avatarUrlScheme');
if (isStorableAvatarUrl(avatarUrl)) return;
const scheme = avatarUrlScheme(avatarUrl);
try {
require('/server/lib/securityLog').record({
key: 'file.avatar-url', action: 'blocked', source: 'setAvatarUrl',
+13
View File
@@ -1,4 +1,5 @@
import Users, { isUserUpdateAllowed, hasForbiddenUserUpdateField, writesNotificationList } from '/models/users';
const { writesUnsafeAvatarUrl } = require('/models/lib/avatarUrlScheme');
Users.allow({
update(userId, doc, fields, modifier) {
@@ -48,6 +49,18 @@ Users.deny({
});
} catch (e) { /* logging must never break the guard */ }
}
// The allow rule above permits every profile.* field, and WeKan's client
// sets an avatar only through the setAvatarUrl method. A direct write of an
// avatar URL that method refuses is an attempt, never ordinary use.
if (writesUnsafeAvatarUrl(modifier)) {
try {
require('/server/lib/securityLog').record({
key: 'file.avatar-url', action: 'blocked', source: 'ddp:user-profile-avatar', userId,
detail: 'Client write of a profile.avatarUrl that setAvatarUrl refuses denied.',
});
} catch (e) { /* logging must never break the guard */ }
return true;
}
return denied;
},
fetch: [],
+3 -1
View File
@@ -22,6 +22,7 @@ import {
countCardsByListId,
buildBoardTileData,
} from '/models/lib/boardTileData';
const { notCurrentUser } = require('/server/lib/notCurrentUser');
const {
effectiveBoardCardsMode,
DEFAULT_LAZY_THRESHOLD,
@@ -379,7 +380,8 @@ Meteor.publish('boardsReport', async function(searchTerm = '', permission = 'all
}
});
const users = await ReactiveCache.getUsers({ _id: { $in: userIds } }, { fields: Users.safeFields }, false);
// #6919: never the current user - see server/lib/notCurrentUser.js.
const users = await ReactiveCache.getUsers(notCurrentUser({ _id: { $in: userIds } }, this.userId), { fields: Users.safeFields }, false);
const teams = await ReactiveCache.getTeams({ _id: { $in: teamIds } }, {}, false);
const orgs = await ReactiveCache.getOrgs({ _id: { $in: orgIds } }, {}, false);
+5 -2
View File
@@ -85,6 +85,7 @@ import { CARD_TYPES } from '../../config/const';
import Org from "../../models/org";
import Team from "../../models/team";
import { MATCH_NOTHING, selectorIsInjection } from '/server/lib/selectorGuard';
const { notCurrentUser } = require('/server/lib/notCurrentUser');
// Search sessions (global search, Due Cards and the other card reports) are
// read, upserted and pruned by { userId, sessionId } and by modifiedAt on
@@ -1535,7 +1536,8 @@ async function findCards(sessionId, query, userId) {
await ReactiveCache.getSwimlanes({ _id: { $in: swimlanes } }, { fields: { ...fields, color: 1 } }, true),
await ReactiveCache.getLists({ _id: { $in: lists } }, { fields: { ...fields, color: 1 } }, true),
await ReactiveCache.getCustomFields({ _id: { $in: customFieldIds } }, {}, true),
await ReactiveCache.getUsers({ _id: { $in: users } }, { fields: Users.safeFields }, true),
// #6919: never the current user - see server/lib/notCurrentUser.js.
await ReactiveCache.getUsers(notCurrentUser({ _id: { $in: users } }, userId), { fields: Users.safeFields }, true),
await ReactiveCache.getChecklists({ cardId: { $in: cardIds } }, {}, true),
await ReactiveCache.getChecklistItems({ cardId: { $in: cardIds } }, {}, true),
attachmentsResult.cursor || attachmentsResult,
@@ -1620,7 +1622,8 @@ Meteor.publish('cardsReport', async function(searchTerm = '', limit, skip = 0) {
const boards = await ReactiveCache.getBoards({ _id: { $in: [...boardIds] } }, { fields: { title: 1 } }, false);
const lists = await ReactiveCache.getLists({ _id: { $in: [...listIds] } }, { fields: { title: 1 } }, false);
const swimlanes = await ReactiveCache.getSwimlanes({ _id: { $in: [...swimlaneIds] } }, { fields: { title: 1 } }, false);
const users = await ReactiveCache.getUsers({ _id: { $in: [...userIds] } }, { fields: Users.safeFields }, false);
// #6919: never the current user - see server/lib/notCurrentUser.js.
const users = await ReactiveCache.getUsers(notCurrentUser({ _id: { $in: [...userIds] } }, this.userId), { fields: Users.safeFields }, false);
for (const doc of cards) { const { _id, ...fields } = doc; this.added('cards', _id, fields); }
for (const doc of boards) { const { _id, ...fields } = doc; this.added('boards', _id, fields); }
+56
View File
@@ -20,6 +20,12 @@ const {
mergeCardScope,
} = require('/models/lib/boardCardScope');
const { sortWithIdTiebreaker } = require('/models/lib/cardSortTiebreaker');
import { otherSwimlaneIdsForFirstActive } from '/models/lib/swimlaneFilter';
import {
DESTINATION_CARD_FIELDS,
MAX_DESTINATION_CARDS,
destinationCardsSelector,
} from '/models/lib/destinationCards';
const { diffCardWindow } = require('/models/lib/cardWindowDiff');
const {
effectiveBoardCardsMode,
@@ -408,3 +414,53 @@ Meteor.publish('boardCardsLoadingMode', async function(boardId) {
this.added('boardCardLoadingModes', boardId, { lazy });
this.ready();
});
// #6917: the cards a destination picker lists - Copy / Move checklist, Copy
// checklist from a template card, Move / Copy card, Link card, and the
// parent-card picker - whatever the board's card-loading mode. A lazily
// loaded board's `board` publication ships no cards, and a picker opens no
// list that would fetch its window, so the card dropdown stayed empty however
// long one waited. This ships only what the dropdown shows
// (models/lib/destinationCards.js) for one list in one swimlane, or for the
// whole board when `listId` is empty, scoped like every other card
// publication: the board must be readable, and an assigned-only member gets
// only the cards assigned to them.
Meteor.publish('destinationCards', async function(boardId, listId, swimlaneId) {
// Match.Any marks each argument checked for audit-argument-checks; a bad
// argument ends this subscription, never the server.
check(boardId, Match.Any);
check(listId, Match.Any);
check(swimlaneId, Match.Any);
const optionalId = Match.OneOf(String, null, undefined);
if (!Match.test(boardId, String) || !boardId) return this.ready();
if (!Match.test(listId, optionalId) || !Match.test(swimlaneId, optionalId)) return this.ready();
const board = await boardVisibleTo(this.userId, boardId);
if (!board) return this.ready();
// The first swimlane also lists the list's orphaned cards, as the board view
// and list.cardsUnfiltered() do (#6443); archived swimlanes stay excluded
// (#6659).
let otherSwimlaneIds;
if (listId && swimlaneId) {
const swimlanes = await ReactiveCache.getSwimlanes(
{ boardId: board._id },
{ sort: { sort: 1 }, fields: { _id: 1, archived: 1 } },
);
otherSwimlaneIds = otherSwimlaneIdsForFirstActive(swimlanes, swimlaneId);
}
const selector = mergeCardScope(
destinationCardsSelector(listId, swimlaneId, otherSwimlaneIds),
{
boardId: board._id,
archived: false,
...assignedOnlyCardScope(board, this.userId),
},
);
return Cards.find(selector, {
fields: DESTINATION_CARD_FIELDS,
sort: { sort: 1, _id: 1 },
limit: MAX_DESTINATION_CARDS,
});
});
+3 -1
View File
@@ -1,5 +1,6 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { impersonationQuery } from '/models/lib/impersonationReportQuery';
const { notCurrentUser } = require('/server/lib/notCurrentUser');
// Admin Panel / Reports / Impersonation. Impersonation events are already written
// to the impersonatedUsers collection whenever an admin impersonates a user (e.g.
@@ -35,8 +36,9 @@ Meteor.publish('impersonationReport', async function(searchTerm = '', limit, ski
if (r.userId) userIds.push(r.userId);
});
// #6919: never the current user - see server/lib/notCurrentUser.js.
const users = await ReactiveCache.getUsers(
{ _id: { $in: [...new Set(userIds)] } },
notCurrentUser({ _id: { $in: [...new Set(userIds)] } }, this.userId),
{
fields: {
username: 1,
+4 -2
View File
@@ -1,5 +1,6 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { canReadBoard } from '/models/lib/boardVisibility';
const { notCurrentUser } = require('/server/lib/notCurrentUser');
const { assignedOnlyAllowsCard } = require('/models/lib/boardCardScope');
// We use these when displaying notifications in the notificationsDrawer
@@ -135,14 +136,15 @@ Meteor.publish('notificationSwimlanes', async function() {
// gets all users associated with activities associated with the current user
Meteor.publish('notificationUsers', async function() {
const activityEntries = await activityDocs();
// #6919: never the current user - see server/lib/notCurrentUser.js.
const ret = await ReactiveCache.getUsers(
{
notCurrentUser({
_id: {
$in: activityEntries
.map(v => v.userId)
.filter(v => !!v),
},
},
}, this.userId),
{
fields: {
username: 1,
+4 -1
View File
@@ -7,6 +7,7 @@ import { safeSelector } from '/server/lib/selectorGuard';
// models/lib/tenantAdmin.js, which merges the restriction with the caller's query
// under $and so a crafted query cannot argue it away.
import * as tenantAdmin from '/models/lib/tenantAdmin';
const { notCurrentUser } = require('/server/lib/notCurrentUser');
Meteor.publish('people', async function(query, limit, skip = 0) {
check(query, Match.OneOf(Object, null));
@@ -22,7 +23,9 @@ Meteor.publish('people', async function(query, limit, skip = 0) {
// execution operator, with the same "match nothing" the card window uses.
const safeQuery = safeSelector(query, 'people');
if (tenantAdmin.canOpenAdminPanel(user)) {
ret = await ReactiveCache.getUsers(tenantAdmin.peopleScopeSelector(user, safeQuery), {
// #6919: never the current user - see server/lib/notCurrentUser.js. Their
// own row reads createdAt, loginDisabled and the rest from user-admin.
ret = await ReactiveCache.getUsers(notCurrentUser(tenantAdmin.peopleScopeSelector(user, safeQuery), this.userId), {
limit,
skip: skip || 0,
sort: { createdAt: -1 },
+38 -6
View File
@@ -1,8 +1,40 @@
Meteor.publish('userDesktopDragHandles', function() {
import { Meteor } from 'meteor/meteor';
// #6919: DDP merges only top-level fields. This publication used to send the
// current user `{ profile: { showDesktopDragHandles } }`; when it ran before
// the accounts publication of the whole profile (Meteor re-runs named
// subscriptions first on every login, a reconnect included), that one-field
// profile won, and the client's profile stayed `{}` until the page was
// reloaded. Every preference read from it went back to its default - a
// checklist folded on a minicard unfolded half a second later - and #6691 had
// found the same for the board view. So, like userBoardView, the preference is
// published under a top-level field of its own and never competes for
// `profile`. tests/noNarrowProfileForCurrentUser6919.test.cjs.
Meteor.publish('userDesktopDragHandles', async function() {
if (!this.userId) return this.ready();
return Meteor.users.find({ _id: this.userId }, {
fields: {
'profile.showDesktopDragHandles': 1
}
let stopped = false;
let handle;
this.onStop(() => {
stopped = true;
if (handle) handle.stop();
});
});
const preference = fields => {
const value = fields.profile?.showDesktopDragHandles;
return { desktopDragHandlesPreference: typeof value === 'boolean' ? value : null };
};
handle = await Meteor.users.find({ _id: this.userId }, {
fields: { 'profile.showDesktopDragHandles': 1 },
}).observeChangesAsync({
added: (id, fields) => {
if (!stopped) this.added('users', id, preference(fields));
},
changed: (id, fields) => {
if (!stopped && 'profile' in fields) this.changed('users', id, preference(fields));
},
removed: id => {
if (!stopped) this.removed('users', id);
},
});
if (stopped) handle.stop();
else this.ready();
});
+14 -4
View File
@@ -10,6 +10,8 @@ DDPRateLimiter.addRule(
10 * 1000,
);
const { notCurrentUser } = require('/server/lib/notCurrentUser');
Meteor.publish('user-miniprofile', async function (usernames) {
check(usernames, Array);
@@ -22,13 +24,14 @@ Meteor.publish('user-miniprofile', async function (usernames) {
// eslint-disable-next-line no-console
// console.log('usernames:', usernames);
// #6919: never the current user - see server/lib/notCurrentUser.js.
const ret = await ReactiveCache.getUsers(
{
notCurrentUser({
$or: [
{ username: { $in: usernames } },
{ importUsernames: { $in: usernames } },
],
},
}, this.userId),
{
fields: {
...Users.safeFields,
@@ -49,6 +52,12 @@ Meteor.publish('user-admin', function () {
authenticationMethod: 1,
// #6736: whether this user previews disabled features. Own document only.
featurePreview: 1,
// #6919: the People / impersonation pages leave the current user out of
// their narrow-profile publications; their own row reads these here.
createdAt: 1,
loginDisabled: 1,
lastConnectionDate: 1,
importUsernames: 1,
},
});
return ret;
@@ -99,13 +108,14 @@ Meteor.publish('user-search', async function (searchTerm) {
// This general publication deliberately exposes only public identity fields.
// Board-authorized email lookup is handled by the bounded searchUsers method.
// #6919: never the current user - see server/lib/notCurrentUser.js.
const ret = await ReactiveCache.getUsers(
{
notCurrentUser({
$or: [
{ username: searchRegex },
{ 'profile.fullname': searchRegex },
],
},
}, this.userId),
{
fields: {
_id: 1,
+4 -4
View File
@@ -19,7 +19,7 @@
# base: core24 (not core26) · no build-base: devel · grade: stable
# ─────────────────────────────────────────────────────────────────────────────
name: wekan
version: '13.12'
version: '13.14'
base: core24
confinement: strict
grade: stable
@@ -703,18 +703,18 @@ parts:
armhf) WEKAN_ARCH="armhf" ;;
*) echo "Unsupported architecture: ${CRAFT_ARCH_BUILD_FOR}"; exit 1 ;;
esac
WEKAN_ZIP="wekan-13.12-${WEKAN_ARCH}.zip"
WEKAN_ZIP="wekan-13.14-${WEKAN_ARCH}.zip"
echo "Cleaning environment first"
rm -rf .build
mkdir .build
cd .build
#wget https://github.com/wekan/wekan/releases/download/v13.12/wekan-13.12-amd64.zip
#wget https://github.com/wekan/wekan/releases/download/v13.14/wekan-13.14-amd64.zip
# Retry: a release asset can 404 for a short while right after it is
# uploaded (CDN/propagation lag), and a plain wget treated that as
# fatal. --retry-on-http-error covers the 404/5xx window; a genuinely
# missing bundle still fails after the tries are spent.
wget --tries=20 --waitretry=20 --retry-on-http-error=404,403,500,502,503 \
"https://github.com/wekan/wekan/releases/download/v13.12/${WEKAN_ZIP}"
"https://github.com/wekan/wekan/releases/download/v13.14/${WEKAN_ZIP}"
unzip "${WEKAN_ZIP}"
python3 ../releases/check-telemetry.py --bundle bundle
rm "${WEKAN_ZIP}"
+92
View File
@@ -0,0 +1,92 @@
'use strict';
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const { test } = require('node:test');
const { sanitizeFilename } = require('../models/lib/filenameSanitizer');
// Exercise the Meteor helper itself with real files, as the copy tests do.
const source = fs.readFileSync(path.join(__dirname, '../models/lib/fileStoreStrategy.js'), 'utf8');
const code = source.slice(source.indexOf('export const rename = ') + 'export const rename = '.length);
const loadRename = collection => new Function('sanitizeFilename', 'Attachments', `return (${code.replace(/;\s*$/, '')});`)(sanitizeFilename, collection);
for (const versions of [['original'], ['original', 'thumbnail'], ['thumbnail', 'original']]) {
test(`rename keeps the upload object and persisted paths aligned: ${versions.join(', ')}`, async () => {
const root = path.join(__dirname, '../.tools/tmp');
fs.mkdirSync(root, { recursive: true });
const directory = fs.mkdtempSync(path.join(root, 'rename-paths-'));
const file = { _id: 'upload', name: 'long-original-name.png', versions: {} };
const bytes = Buffer.from([0, 1, 2, 255]);
const writes = [];
let completedWrites = 0;
const collection = {
async updateAsync(selector, modifier) {
assert.deepEqual(selector, { _id: file._id });
await new Promise(resolve => setImmediate(resolve));
writes.push(modifier.$set);
completedWrites++;
},
};
for (const version of versions) {
const filename = path.join(directory, `old-${version}.png`);
fs.writeFileSync(filename, bytes);
file.versions[version] = { path: filename, storage: 'fs' };
}
file.path = file.versions.original.path;
const oldPath = file.path;
const factory = {
storagePath: directory,
collection,
getFileStrategy(fileObj, version) {
return {
getNewPath(storagePath, name) { return path.join(storagePath, `${version}-${name}`); },
rename(destination) { fs.renameSync(fileObj.versions[version].path, destination); },
};
},
};
try {
await loadRename({ updateAsync() { assert.fail('use the supplied collection'); } })(file, 'short.png', factory);
assert.equal(completedWrites, versions.length, 'the caller must wait for persistence');
assert.equal(file.path, file.versions.original.path, 'validation must open the renamed original');
assert.deepEqual(fs.readFileSync(file.path), bytes);
assert.equal(fs.existsSync(oldPath), false);
for (const [index, version] of versions.entries()) {
assert.equal(writes[index][`versions.${version}.path`], file.versions[version].path);
assert.deepEqual(fs.readFileSync(file.versions[version].path), bytes);
assert.equal(writes[index].name, 'short.png');
assert.equal(writes[index].extension, 'png');
assert.equal(writes[index].extensionWithDot, '.png');
if (version === 'original') assert.equal(writes[index].path, file.path);
else assert.equal(Object.hasOwn(writes[index], 'path'), false, 'a thumbnail must not replace the original path');
}
// onAfterUpload persists this object again; it must not restore old paths.
assert.deepEqual(file.versions.original.path, writes[versions.indexOf('original')]['versions.original.path']);
} finally {
fs.rmSync(directory, { recursive: true, force: true });
}
});
}
test('a failed physical rename leaves paths untouched and does not write metadata', async () => {
const file = { _id: 'missing', path: 'old.png', versions: { original: { path: 'old.png' } } };
const before = structuredClone(file);
const factory = {
collection: { async updateAsync() { assert.fail('a failed rename must not persist new paths'); } },
getFileStrategy() { return {
getNewPath() { return 'new.png'; },
rename() { throw new Error('no file found on disk'); },
}; },
};
await assert.rejects(loadRename()(file, 'new.png', factory), /no file found on disk/);
assert.deepEqual(file, before);
});
test('rename propagates a failed metadata write to its caller', async () => {
const file = { _id: 'upload', path: 'old.png', versions: { original: { path: 'old.png' } } };
const collection = { async updateAsync() { throw new Error('write failed'); } };
const factory = { getFileStrategy() { return {
getNewPath() { return 'new.png'; }, rename() {},
}; } };
await assert.rejects(loadRename(collection)(file, 'new.png', factory), /write failed/);
});
+87
View File
@@ -0,0 +1,87 @@
'use strict';
// setAvatarUrl refuses javascript:, file:, data:text/html and the rest, but the
// Users allow rule permits every profile.* field, so a direct client
// Users.update({$set: {'profile.avatarUrl': ...}}) stored what the method
// refuses. models/lib/avatarUrlScheme.js is now the one rule for both, and the
// Users deny rule applies it to the client write.
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const test = require('node:test');
const { isStorableAvatarUrl, writesUnsafeAvatarUrl } = require('../models/lib/avatarUrlScheme');
const root = path.join(__dirname, '..');
const read = rel => fs.readFileSync(path.join(root, rel), 'utf8');
test('accepted avatar URLs: empty, local path, http(s), data:image', () => {
for (const url of ['', '/cdn/storage/avatars/abc', 'https://example.com/a.png',
'HTTP://example.com/a.png', 'data:image/png;base64,AAAA']) {
assert.equal(isStorableAvatarUrl(url), true, url);
}
});
test('negative: refused avatar URLs: active and foreign schemes', () => {
for (const url of ['javascript:alert(1)', 'JavaScript:alert(1)', 'data:text/html,<script>',
'file:///etc/passwd', '//evil.example/a.png', 'ftp://host/a.png', 'gopher://x',
'vbscript:x', 'no-scheme.png', null, undefined, 42, {}]) {
assert.equal(isStorableAvatarUrl(url), false, String(url));
}
});
test('a client write of a safe avatar URL, or clearing it, is allowed', () => {
assert.equal(writesUnsafeAvatarUrl({ $set: { 'profile.avatarUrl': 'https://example.com/a.png' } }), false);
assert.equal(writesUnsafeAvatarUrl({ $set: { 'profile.avatarUrl': '' } }), false);
assert.equal(writesUnsafeAvatarUrl({ $unset: { 'profile.avatarUrl': '' } }), false);
assert.equal(writesUnsafeAvatarUrl({ $set: { profile: { fullname: 'A', avatarUrl: '/cdn/x' } } }), false);
assert.equal(writesUnsafeAvatarUrl({ $set: { profile: { fullname: 'A' } } }), false);
assert.equal(writesUnsafeAvatarUrl({ $set: { 'profile.fullname': 'javascript:' } }), false,
'another profile field is not the avatar');
assert.equal(writesUnsafeAvatarUrl(null), false);
});
test('negative: every way to store a refused avatar URL directly is denied', () => {
const bad = 'javascript:alert(document.cookie)';
assert.equal(writesUnsafeAvatarUrl({ $set: { 'profile.avatarUrl': bad } }), true);
assert.equal(writesUnsafeAvatarUrl({ $setOnInsert: { 'profile.avatarUrl': bad } }), true);
assert.equal(writesUnsafeAvatarUrl({ $set: { profile: { avatarUrl: bad } } }), true);
assert.equal(writesUnsafeAvatarUrl({ $set: { 'profile.avatarUrl': { $gt: '' } } }), true, 'not a string');
assert.equal(writesUnsafeAvatarUrl({ $set: { 'profile.avatarUrl.x': 'https://a' } }), true);
assert.equal(writesUnsafeAvatarUrl({ $rename: { 'profile.fullname': 'profile.avatarUrl' } }), true);
assert.equal(writesUnsafeAvatarUrl({ $push: { 'profile.avatarUrl': 'https://a' } }), true);
assert.equal(writesUnsafeAvatarUrl({ $set: { 'profile.avatarUrl': 'file:///etc/passwd' } }), true);
});
test('the Users deny rule applies it and logs the attempt to Admin Panel / Problems', () => {
const rule = read('server/permissions/users.js');
const deny = rule.slice(rule.indexOf('Users.deny({'));
assert.match(deny, /if \(writesUnsafeAvatarUrl\(modifier\)\) \{[\s\S]*?key: 'file\.avatar-url', action: 'blocked'[\s\S]*?catch \(e\) \{ \/\* logging must never break the guard \*\/ \}[\s\S]*?return true;/);
assert.match(read('models/lib/securityCategories.js'), /'file\.avatar-url':/);
});
test('both avatar methods use the same rule as the deny rule', () => {
const methods = read('server/models/users.js');
assert.match(methods, /function assertSafeAvatarUrl\(avatarUrl\) \{\s*const \{ isStorableAvatarUrl, avatarUrlScheme \} = require\('\/models\/lib\/avatarUrlScheme'\);/);
for (const name of ['setAvatarUrl', 'adminSetAvatarUrl']) {
const start = methods.indexOf(`async ${name}(`);
assert.ok(start > 0, `${name} exists`);
const body = methods.slice(start, methods.indexOf('\n },', start));
assert.match(body, /assertSafeAvatarUrl\(avatarUrl\);/, `${name} validates the URL`);
}
});
test('negative: no client code writes profile.avatarUrl directly, so the deny breaks nothing', () => {
const offenders = [];
const walk = dir => {
for (const entry of fs.readdirSync(path.join(root, dir), { withFileTypes: true })) {
const rel = path.join(dir, entry.name);
if (entry.isDirectory()) walk(rel);
else if (/\.js$/.test(entry.name)) {
const src = read(rel);
if (/(update|updateAsync)\([^)]*['"]profile\.avatarUrl['"]/.test(src) ||
/\$set:\s*\{\s*['"]profile\.avatarUrl['"]/.test(src)) offenders.push(rel);
}
}
};
walk('client');
assert.deepEqual(offenders, [], 'the client sets an avatar only through Meteor.call(setAvatarUrl)');
});
+9 -4
View File
@@ -159,10 +159,15 @@ check('both the window and its COUNT are narrowed', () => {
// guard that counts its own explanation counts wrong.
const code = src.replace(/\/\*[\s\S]*?\*\//g, '').replace(/^\s*\/\/.*$/gm, '');
const uses = code.match(/\.\.\.assignedOnlyCardScope\(/g) || [];
assert.strictEqual(uses.length, 2,
'boardCardsWindow AND boardListCardCount — an unrestricted count would still '
+ 'tell the member how many cards the list really holds, and offer to scroll '
+ 'in cards that never arrive');
// #6917 added a third card publication, destinationCards (the card titles a
// destination picker lists); it is narrowed the same way.
assert.strictEqual(uses.length, 3,
'boardCardsWindow, boardListCardCount AND destinationCards — an unrestricted '
+ 'count would still tell the member how many cards the list really holds, '
+ 'and an unrestricted picker would list the titles of cards they may not see');
const picker = code.slice(code.indexOf("Meteor.publish('destinationCards'"));
assert.ok(/\.\.\.assignedOnlyCardScope\(board, this\.userId\)/.test(picker),
'destinationCards narrows its cards for an assigned-only member');
// The children (comments/attachments/checklists/items) hang off windowCardIds,
// which builds on the same selector — so they cannot leak past the restriction.
+3 -2
View File
@@ -57,10 +57,11 @@ test('the workflow: skip without a Node.js, verify every download, build and sta
assert.match(workflow, /mount -u -o wxallowed "\$\(df -P \. \| awk 'NR==2 \{print \$6\}'\)"/);
assert.match(workflow, /CC=\/usr\/pkg\/gcc14\/bin\/gcc CXX=\/usr\/pkg\/gcc14\/bin\/g\+\+/);
// The same FreeBSD VM that built the Node.js builds the native modules. A
// dependabot bump of one (v1.5.9, #6781) has to be made in the other too.
// dependabot bump of one (v1.5.9, #6781; v1.6.0, #6907) has to be made in
// the other too.
const pin = workflow.match(/uses: vmactions\/freebsd-vm@([0-9a-f]{40})/);
assert.ok(pin, 'FreeBSD VM pinned to a commit');
assert.equal(pin[1], 'c46abacb49f09938ca4e1702d15d836285d694cc', 'FreeBSD VM pinned to the commit node-patches uses');
assert.equal(pin[1], '811efaaac0668df8bfb8308c3ec997b5ab50037b', 'FreeBSD VM pinned to the commit node-patches uses');
const np = path.join(__dirname, '..', '.tools', 'w', 'node-patches', '.github', 'workflows', 'release-all.yml');
if (fs.existsSync(np)) {
assert.match(fs.readFileSync(np, 'utf8'), new RegExp(`uses: vmactions/freebsd-vm@${pin[1]}`), 'node-patches uses the same commit');
+70
View File
@@ -0,0 +1,70 @@
'use strict';
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const { test } = require('node:test');
const { liveAttachments } = require('../models/lib/attachmentSoftDelete');
// Exercise the shared remover used by REST single/bulk deletion and the
// collection hook. The storage/lifecycle helper is tested in its own suites.
const source = fs.readFileSync(path.join(__dirname, '../models/cards.js'), 'utf8');
const start = source.indexOf('async function cardRemover(');
const body = source.slice(start, source.indexOf('\n// #5323:', start));
function remover({ attachments = [], softDelete, isServer = true }) {
const calls = [];
const direct = { removeAsync: async () => {} };
const load = new Function(
'Meteor', 'ChecklistItems', 'Checklists', 'CardComments', 'Cards', 'Attachments',
'require', 'liveAttachments', 'onlyChildrenSelector', 'sharedChildrenSelector',
`${body}; return cardRemover;`,
);
const remove = load({ isServer }, { direct }, { direct }, { direct }, {
find: () => ({ fetchAsync: async () => [] }), removeAsync: async () => {},
}, {
collection: { find(selector) {
calls.push(['find', selector]);
return { fetchAsync: async () => attachments };
} },
async removeAsync(selector) { calls.push(['legacyRemove', selector]); },
}, name => {
if (name === '/server/attachmentSoftDelete') return { softDeleteAttachment: softDelete };
if (name === '/models/changeHistory') return { default: { record: async () => {} } };
throw new Error(`Unexpected module: ${name}`);
}, liveAttachments, () => ({}), () => ({}));
return { remove, calls };
}
test('card deletion awaits recoverable deletion of attachments selected by meta.cardId', async () => {
const attachments = [{ _id: 'first' }, { _id: 'second' }];
const completed = [];
const { remove, calls } = remover({ attachments, softDelete: async input => {
await new Promise(resolve => setImmediate(resolve));
completed.push(input);
} });
await remove('actor', { _id: 'card' });
assert.deepEqual(calls[0], ['find', { 'meta.cardId': 'card', deletedAt: null }]);
assert.deepEqual(completed, attachments.map(attachment => ({ userId: 'actor', attachment })));
assert.deepEqual(calls[1], ['legacyRemove', { cardId: 'card' }], 'keep legacy purge behavior');
});
test('an empty live attachment set performs no lifecycle writes', async () => {
const { remove, calls } = remover({ softDelete: async () => assert.fail('no live attachments') });
await remove(null, { _id: 'empty' });
assert.deepEqual(calls[0], ['find', { 'meta.cardId': 'empty', deletedAt: null }]);
});
test('a failed attachment deletion is propagated before the card can be removed', async () => {
const { remove, calls } = remover({ attachments: [{ _id: 'failed' }], softDelete: async () => {
throw new Error('attachment write failed');
} });
await assert.rejects(remove('actor', { _id: 'card' }), /attachment write failed/);
assert.equal(calls.length, 1, 'do not continue the purge after a failed lifecycle write');
});
test('the shared model does not load the server attachment helper on the client', async () => {
const { remove, calls } = remover({ isServer: false, softDelete: async () => assert.fail('server-only helper') });
await remove(null, { _id: 'card' });
assert.deepEqual(calls, [['legacyRemove', { cardId: 'card' }]]);
});
+10 -3
View File
@@ -107,13 +107,20 @@ test('Shift+M and Shift+C are bound once, and the plain m and c keep their own a
assert.deepEqual(bindings.filter(b => keysOf(b).includes('m')), ['m'], 'm stays assign yourself');
assert.deepEqual(bindings.filter(b => keysOf(b).includes('c')), ['c'], 'c stays archive');
const fn = keyboard.slice(keyboard.indexOf('function runCardMenuActionWhenRendered'), keyboard.indexOf("hotkeys('shift+m'"));
// #6924 changed the route, not the permission: Shift+M / Shift+C no longer
// click the card's hamburger menu and then its item - which showed the card,
// the menu and the popup - but open only the Move card / Copy card popup.
// It is allowed exactly when the menu would render the item
// (client/lib/cardShortcutPopup.js, tests/cardShortcutPopup.test.cjs), and
// without the item nothing opens, so no menu is left open either.
const fn = keyboard.slice(keyboard.indexOf('function cardShortcutFacts'), keyboard.indexOf("hotkeys('shift+m'"));
assert.match(fn, /if \(Utils\.getCurrentCardId\(\) !== cardId\) return;/,
'negative: stops when another card was opened meanwhile');
assert.match(fn, /Date\.now\(\) - started < 3000/, 'gives up rather than waiting forever');
assert.match(fn, /result === 'no-item'\) \{\s*\n\s*Popup\.close\(\);/, 'a menu without the item is closed again');
assert.match(fn, /const name = cardShortcutPopup\(action, cardShortcutFacts\(card\)\);\s*\n\s*if \(!name \|\| !anchor\) return false;/,
'nothing opens where the menu has no such item');
assert.match(fn, /Meteor\.userId\(\) === null \|\| !Utils\.canModifyBoard\(\)\) return false;/);
assert.doesNotMatch(fn, /Popup\.open/, 'never opens the popup past the menu item');
assert.doesNotMatch(fn, /cardMenuStep|Utils\.goCardId/, 'negative: #6924 - no menu first, no card opened');
assert.match(fn, /Session\.get\('selectedCard'\) \|\| getHoveredCardId\(\)/, 'with no opened card, the same card as d');
});
+97
View File
@@ -0,0 +1,97 @@
'use strict';
// #6924: `d`, Shift+M and Shift+C open ONLY their popup - next to a hovered or
// selected minicard without opening the card, and on an opened card without
// showing its hamburger menu first. The popup is opened directly, so
// cardShortcutPopup must allow exactly what a click on the rendered control
// would: these tests drive it, and tie each rule to the template condition the
// control is rendered under.
const { test } = require('node:test');
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const root = path.join(__dirname, '..');
const read = rel => fs.readFileSync(path.join(root, rel), 'utf8');
const load = () => import('../client/lib/cardShortcutPopup.js');
const editor = { canModifyCard: true, isBoardAdmin: false, isWorker: false, isReadOnly: false,
isReadAssignedOnly: false, allowsDueDate: true, hasDue: false };
test('each shortcut opens its own popup for somebody a click would let open it', async () => {
const { cardShortcutPopup } = await load();
assert.equal(cardShortcutPopup('due', editor), 'editCardDueDate');
assert.equal(cardShortcutPopup('due', { ...editor, hasDue: true }), 'editCardDueDate');
assert.equal(cardShortcutPopup('move', { ...editor, isBoardAdmin: true }), 'moveCard');
assert.equal(cardShortcutPopup('copy', editor), 'copyCard');
// A Worker edits an existing due date through its badge.
assert.equal(cardShortcutPopup('due', { ...editor, isWorker: true, hasDue: true }), 'editCardDueDate');
// cardMenuWrites: a member who may not modify the card but is not read-only.
assert.equal(cardShortcutPopup('copy', { ...editor, canModifyCard: false }), 'copyCard');
});
test('negative: nothing opens where the control a click would use is not rendered', async () => {
const { cardShortcutPopup } = await load();
assert.equal(cardShortcutPopup('due', { ...editor, canModifyCard: false }), null, 'no badge or + without canModifyCard');
assert.equal(cardShortcutPopup('due', { ...editor, allowsDueDate: false }), null, 'board has due dates off');
assert.equal(cardShortcutPopup('due', { ...editor, isWorker: true }), null, 'a Worker gets no + to add one');
assert.equal(cardShortcutPopup('move', editor), null, 'Move card is for board admins');
assert.equal(cardShortcutPopup('copy', { ...editor, isWorker: true }), null, 'no Copy card for a Worker');
for (const ro of [{ isReadOnly: true }, { isReadAssignedOnly: true }]) {
const facts = { ...editor, ...ro, canModifyCard: false, isBoardAdmin: true };
assert.equal(cardShortcutPopup('move', facts), null, 'read-only: no cardMenuWrites');
assert.equal(cardShortcutPopup('copy', facts), null, 'read-only: no cardMenuWrites');
}
assert.equal(cardShortcutPopup('archive', editor), null, 'only the three shortcuts');
assert.equal(cardShortcutPopup('due'), null, 'no facts, no popup');
});
test('the rules are the conditions the controls are rendered under', () => {
const jade = read('client/components/cards/cardDetails.jade');
const menu = jade.slice(jade.indexOf('template(name="cardDetailsActionsPopup")'));
assert.match(menu, /if cardMenuWrites\s*\n\s*if currentUser\.isBoardAdmin\s*\n\s*li\s*\n\s*a\.js-move-card/);
assert.match(menu, /unless currentUser\.isWorker\s*\n\s*li\s*\n\s*a\.js-copy-card/);
const due = jade.slice(jade.indexOf('if $eq field "dueDate"'), jade.indexOf('if $eq field "endDate"'));
assert.match(due, /if currentBoard\.allowsDueDate/);
assert.match(due, /if getDue\s*\n\s*\+cardDueDate\(card=this canModifyCard=canModifyCard\)/);
assert.match(due, /if canModifyCard\s*\n\s*unless currentUser\.isWorker\s*\n\s*a\.card-label\.add-label\.js-due-date/);
assert.match(read('client/components/cards/cardDate.jade'), /template\(name="dateBadgeBody"\)\s*\n\s*if canModifyCard\s*\n\s*a\.js-edit-date/);
const js = read('client/components/cards/cardDetails.js');
assert.match(js, /cardMenuWrites\(\) \{\s*\n\s*if \(Utils\.canModifyCard\(this\)\) return true;[\s\S]{0,200}isReadOnly[\s\S]{0,80}isReadAssignedOnly/);
// The same popups the controls open.
assert.match(js, /'click \.js-move-card': Popup\.open\('moveCard'\)/);
assert.match(js, /'click \.js-copy-card': Popup\.open\('copyCard'\)/);
assert.match(js, /'click \.js-due-date': Popup\.open\('editCardDueDate'\)/);
});
test('the popup is anchored to the minicard, the hovered one first', async () => {
const { findMinicard } = await load();
const a = { id: 'a', getAttribute: () => 'card1' };
const b = { id: 'b', getAttribute: () => 'card1' };
const doc = { querySelector: sel => (sel === '.js-minicard[data-card-id="card1"]' ? a : null) };
assert.equal(findMinicard(doc, 'card1'), a);
assert.equal(findMinicard(doc, 'card1', b), b, 'the hovered copy of the card');
assert.equal(findMinicard(doc, 'card1', { getAttribute: () => 'other' }), a, 'a hovered OTHER card is not it');
assert.equal(findMinicard(doc, 'missing'), null);
// negative: an id that is not a plain id never reaches a selector
for (const bad of ['x"] , *', '', null, 'a b']) assert.equal(findMinicard(doc, bad), null);
});
test('keyboard.js opens only the popup: the card is not opened and no menu is shown', () => {
const kb = read('client/lib/keyboard.js');
const due = kb.slice(kb.indexOf('export function openDueDateEditorOfOpenedCard'), kb.indexOf("hotkeys('d, shift+d'"));
const menu = kb.slice(kb.indexOf('function cardShortcutFacts'), kb.indexOf("hotkeys('shift+m'"));
// An opened card's `d` still clicks its own rendered control (#6750, #6840).
assert.match(due, /clickDueDateControlWhenRendered\(cardId\)/);
assert.match(due, /return openCardShortcutPopupAtMinicard\('due'\);/);
for (const fn of [due, menu]) {
assert.doesNotMatch(fn, /Utils\.goCardId/, 'negative: the card is not opened');
assert.doesNotMatch(fn, /cardMenuStep|\.js-open-card-details-menu'\)\.click|opened-menu/, 'negative: no menu first');
}
assert.match(menu, /const name = cardShortcutPopup\(action, cardShortcutFacts\(card\)\);\s*\n\s*if \(!name \|\| !anchor\) return false;/,
'nothing opens without permission or an anchor');
assert.match(menu, /Popup\.open\(name\)\.call\(card,/, 'the card is the popup data context');
assert.match(menu, /Session\.get\('selectedCard'\) \|\| getHoveredCardId\(\)/, 'the same card every card shortcut uses');
assert.match(menu, /if \(Utils\.getCurrentCardId\(\) !== cardId\) return;/, 'negative: stops when another card was opened');
assert.match(menu, /Date\.now\(\) - started < 3000/, 'gives up rather than waiting forever');
assert.match(menu, /Meteor\.userId\(\) === null \|\| !Utils\.canModifyBoard\(\)\) return false;/);
});
+322
View File
@@ -0,0 +1,322 @@
'use strict';
// #6917: Copy Checklist's card dropdown stayed empty for a board with more
// cards than the lazy-loading threshold. The destination pickers read the
// cards of the chosen board from the `board` publication, which ships none
// for a board that loads lazily, and a picker opens no list that would fetch
// its window. The pickers now subscribe to `destinationCards`, which ships one
// list's card titles whatever the card-loading mode.
//
// This runs:
// - the pure selector and field list (models/lib/destinationCards.js);
// - the real publication handler in a vm, against a stub database: readable
// board, unreadable board, an assigned-only member, bad arguments;
// - the real picker dialog with a lazy destination board: the board's
// swimlanes and lists arrive, its cards only through destinationCards;
// - a source scan: every client picker that lists another board's cards
// subscribes to destinationCards.
//
// Run: node tests/destinationCards6917.test.cjs
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const vm = require('node:vm');
const ROOT = path.join(__dirname, '..');
const read = rel => fs.readFileSync(path.join(ROOT, rel), 'utf8');
const script = rel => read(rel).replace(/^import [\s\S]*?;\n/gm, '').replace(/^export \{[^}]*\};?\n/gm, '').replace(/^export /gm, '');
let checks = 0;
function test(name, fn) {
return Promise.resolve().then(fn).then(() => {
checks += 1;
console.log(' ok -', name);
});
}
// A small Mongo-ish matcher, enough for the selectors built here.
function matches(doc, sel) {
return Object.entries(sel).every(([key, cond]) => {
if (key === '$and') return cond.every(part => matches(doc, part));
const value = doc[key];
if (cond && typeof cond === 'object' && !Array.isArray(cond)) {
if ('$in' in cond) {
const values = Array.isArray(value) ? value : [value];
return cond.$in.some(v => values.includes(v) || (v == null && value == null));
}
if ('$nin' in cond) return !cond.$nin.includes(value);
if ('$ne' in cond) return value !== cond.$ne;
}
if (key === 'archived') return !value === !cond;
return value === cond;
});
}
(async () => {
const { DESTINATION_CARD_FIELDS, MAX_DESTINATION_CARDS, destinationCardsSelector } =
await import('../models/lib/destinationCards.js');
const { listCardsSelector } = await import('../models/lib/swimlaneFilter.js');
await test('selector: one list in one swimlane is exactly the board view\'s list selector', () => {
assert.deepEqual(destinationCardsSelector('L1', 'S2'), listCardsSelector('L1', 'S2'));
assert.deepEqual(destinationCardsSelector('L1', 'S1', ['S2']), listCardsSelector('L1', 'S1', ['S2']));
});
await test('selector: a list with no swimlane is the whole list, no list is the whole board', () => {
assert.deepEqual(destinationCardsSelector('L1', null), { listId: 'L1', archived: false });
assert.deepEqual(destinationCardsSelector(null, null), { archived: false });
assert.deepEqual(destinationCardsSelector('', 'S1'), { archived: false });
});
await test('negative: the picker fields carry no card content beyond the title', () => {
for (const field of ['description', 'members', 'assignees', 'customFields', 'receivedAt', 'userId']) {
assert.ok(!(field in DESTINATION_CARD_FIELDS), `${field} must not be published to a picker`);
}
for (const field of ['_id', 'title', 'sort', 'listId', 'swimlaneId', 'archived', 'type']) {
assert.equal(DESTINATION_CARD_FIELDS[field], 1, `${field} is needed by a picker`);
}
assert.ok(MAX_DESTINATION_CARDS >= 1144, 'the reported board\'s cards fit');
});
// ---- the publication handler, run for real -----------------------------
const src = read('server/publications/cardsWindow.js');
const start = src.indexOf("Meteor.publish('destinationCards'");
assert.ok(start > 0, 'destinationCards is published');
const open = src.indexOf('async function', start);
let depth = 0;
let end = src.indexOf('{', open);
for (; end < src.length; end += 1) {
if (src[end] === '{') depth += 1;
else if (src[end] === '}' && --depth === 0) break;
}
const handlerSource = src.slice(open, end + 1);
const { assignedOnlyCardScope, mergeCardScope } = require('../models/lib/boardCardScope.js');
const { otherSwimlaneIdsForFirstActive } = await import('../models/lib/swimlaneFilter.js');
const boards = {
big: { _id: 'big', members: [
{ userId: 'u', isActive: true },
{ userId: 'ao', isActive: true, isNormalAssignedOnly: true },
] },
secret: { _id: 'secret', members: [] },
};
const cards = [];
for (let i = 0; i < 1144; i += 1) {
cards.push({ _id: `c${i}`, title: `Card ${i}`, boardId: 'big', listId: i % 2 ? 'L2' : 'L1',
swimlaneId: 'S1', sort: i, archived: false, description: 'secret text', assignees: i === 4 ? ['ao'] : [] });
}
cards.push({ _id: 'gone', title: 'Archived', boardId: 'big', listId: 'L1', swimlaneId: 'S1', sort: 0, archived: true });
cards.push({ _id: 'orphan', title: 'Orphan', boardId: 'big', listId: 'L1', swimlaneId: 'deleted', sort: 0, archived: false });
cards.push({ _id: 'lane2', title: 'Lane 2', boardId: 'big', listId: 'L1', swimlaneId: 'S2', sort: 0, archived: false });
cards.push({ _id: 'hidden', title: 'Other board', boardId: 'secret', listId: 'L1', swimlaneId: 'S1', sort: 0, archived: false });
const Match = {
Any: 'any',
OneOf: (...types) => ({ oneOf: types }),
test(value, type) {
if (type && type.oneOf) return type.oneOf.some(t => Match.test(value, t));
// The handler runs in a vm, whose String is not this file's.
if (typeof type === 'function' && type.name === 'String') return typeof value === 'string';
if (type === null) return value === null;
if (type === undefined) return value === undefined;
return true;
},
};
const handler = vm.runInNewContext(`(${handlerSource})`, {
check() {}, Match,
boardVisibleTo: async (userId, id) => (id === 'big' && userId ? boards.big : null),
ReactiveCache: { getSwimlanes: async () => [{ _id: 'S1' }, { _id: 'S2' }] },
otherSwimlaneIdsForFirstActive, mergeCardScope, assignedOnlyCardScope,
destinationCardsSelector, DESTINATION_CARD_FIELDS, MAX_DESTINATION_CARDS,
Cards: { find: (selector, options) => ({ selector, options,
docs: cards.filter(c => matches(c, selector)).sort((a, b) => a.sort - b.sort).slice(0, options.limit) }) },
});
const publish = async (userId, ...args) => {
let readied = false;
const result = await handler.call({ userId, ready() { readied = true; } }, ...args);
return { result, readied };
};
await test('a lazily loaded board\'s list: every one of its cards, with titles only', async () => {
const { result } = await publish('u', 'big', 'L1', 'S1');
// S1 is the first swimlane: its orphaned card is listed too, S2's is not.
const ids = result.docs.map(c => c._id);
assert.equal(ids.filter(id => /^c\d+$/.test(id)).length, 572);
assert.ok(ids.includes('orphan'));
assert.ok(!ids.includes('lane2'));
assert.ok(!ids.includes('gone'), 'no archived card');
assert.equal(result.options.fields, DESTINATION_CARD_FIELDS);
assert.equal(result.options.limit, MAX_DESTINATION_CARDS);
});
await test('the second swimlane lists only its own cards', async () => {
const { result } = await publish('u', 'big', 'L1', 'S2');
assert.deepEqual(result.docs.map(c => c._id), ['lane2']);
});
await test('no list: the whole board, never another board\'s card', async () => {
const { result } = await publish('u', 'big', null, null);
assert.equal(result.docs.length, 1144 + 2);
assert.ok(!result.docs.some(c => c.boardId !== 'big'));
});
await test('negative: an assigned-only member gets only the cards assigned to them', async () => {
const { result } = await publish('ao', 'big', null, null);
assert.deepEqual(result.docs.map(c => c._id), ['c4']);
});
await test('negative: an unreadable board, no user, or bad arguments publish nothing', async () => {
for (const args of [
['u', 'secret', 'L1', 'S1'],
[null, 'big', 'L1', 'S1'],
['u', null, 'L1', 'S1'],
['u', '', 'L1', 'S1'],
['u', { $ne: null }, 'L1', 'S1'],
['u', 'big', { $ne: null }, 'S1'],
['u', 'big', 'L1', { $gt: '' }],
]) {
const { result, readied } = await publish(...args);
assert.equal(readied, true, `ready for ${JSON.stringify(args)}`);
assert.equal(result, undefined, `no cursor for ${JSON.stringify(args)}`);
}
});
// ---- the picker dialog, with a lazy destination board ------------------
class ReactiveVar {
constructor(value) { this.value = value; }
get() { return this.value; }
set(value) { this.value = value; }
}
function dialogWorld() {
const docs = { swimlanes: [{ _id: 'A-lane', boardId: 'A', sort: 0 }],
lists: [{ _id: 'A-list', boardId: 'A', swimlaneId: '', sort: 0 }], cards: [] };
const find = coll => q => ({ fetch: () => docs[coll].filter(d => matches(d, Object.fromEntries(
Object.entries(q).filter(([k]) => k !== 'deletedAt')))).sort((a, b) => a.sort - b.sort) });
const context = {
ReactiveVar,
ReactiveCache: {
getList: q => {
const l = docs.lists.find(d => d._id === q._id && d.boardId === q.boardId);
return l ? { ...l, cardsUnfiltered: sl => docs.cards.filter(c => c.listId === l._id && c.swimlaneId === sl) } : null;
},
getCurrentUser: () => ({ getTemplatesBoardId: () => 'T' }),
},
Boards: { findOne: id => ({ _id: id }), find: () => ({ fetch: () => [] }) },
Swimlanes: { find: find('swimlanes') },
Lists: { find: find('lists') },
Utils: { getCurrentBoardId: () => 'A' },
TAPi18n: { __: k => k },
Meteor: { userId: () => 'u' },
};
const Base = vm.runInNewContext(`${script('client/lib/dialogWithBoardSwimlaneList.js')}\nBoardSwimlaneListDialog`, context);
const Card = vm.runInNewContext(`${script('client/lib/dialogWithBoardSwimlaneListCard.js')}\nBoardSwimlaneListCardDialog`,
{ ...context, BoardSwimlaneListDialog: Base });
const subs = [];
const autoruns = [];
const tpl = {
view: { onViewDestroyed() {} },
subscribe(name, ...args) {
const handle = { name, args, stopped: false, stop() { this.stopped = true; }, callbacks: args.at(-1) };
subs.push(handle);
return handle;
},
// Enough of Blaze's template autorun: re-run on demand, stopping the
// subscriptions the previous run made, as Blaze does.
autorun(fn) {
const run = { fn, subs: [] };
run.go = () => {
run.subs.forEach(s => s.stop());
const before = subs.length;
fn();
run.subs = subs.slice(before);
};
autoruns.push(run);
run.go();
},
};
const rerun = () => autoruns.forEach(r => r.go());
const big = () => {
docs.swimlanes.push({ _id: 'B-lane', boardId: 'B', sort: 0 });
docs.lists.push({ _id: 'B-list', boardId: 'B', swimlaneId: '', sort: 0 });
};
const bigCards = () => {
for (let i = 0; i < 3; i += 1) docs.cards.push({ _id: `B-card${i}`, title: `T${i}`, boardId: 'B', listId: 'B-list', swimlaneId: 'B-lane', sort: i });
};
return { Card, tpl, subs, rerun, big, bigCards };
}
await test('a lazy destination board: the list\'s cards arrive through destinationCards and fill the dropdown', () => {
const w = dialogWorld();
const dialog = new w.Card(w.tpl, { getDialogOptions: () => ({ A: { boardId: 'B', swimlaneId: 'B-lane', listId: 'B-list', cardId: 'B-card2' } }) });
w.rerun();
const cardSub = () => w.subs.filter(s => s.name === 'destinationCards').at(-1);
assert.deepEqual(cardSub().args.slice(0, 3), ['B', 'B-list', 'B-lane']);
// The board is ready with its swimlanes and lists, and - being lazy - no cards.
w.big();
w.subs.filter(s => s.name === 'board').at(-1).callbacks.onReady();
assert.equal(dialog.loading.get(), false);
assert.equal(dialog.cardsLoading.get(), true, 'Done waits for the cards');
assert.equal(dialog.selectedCardId.get(), 'B-card2', 'the remembered card is not dropped before its list\'s cards arrive');
assert.deepEqual(dialog.cards(), []);
w.bigCards();
cardSub().callbacks.onReady();
assert.equal(dialog.cardsLoading.get(), false);
assert.deepEqual(dialog.cards().map(c => c._id), ['B-card0', 'B-card1', 'B-card2']);
assert.equal(dialog.selectedCardId.get(), 'B-card2');
});
await test('negative: a remembered card that is gone is cleared once the list\'s cards are there; an old list\'s answer changes nothing', () => {
const w = dialogWorld();
const dialog = new w.Card(w.tpl, { getDialogOptions: () => ({ A: { boardId: 'B', swimlaneId: 'B-lane', listId: 'B-list', cardId: 'B-deleted' } }) });
w.rerun();
const first = w.subs.filter(s => s.name === 'destinationCards').at(-1);
w.big();
w.bigCards();
w.subs.filter(s => s.name === 'board').at(-1).callbacks.onReady();
assert.equal(dialog.selectedCardId.get(), 'B-deleted');
// Another list is chosen before the first list's answer: that answer is stale.
dialog.selectedListId.set('B-other');
w.rerun();
assert.equal(first.stopped, true, 'the previous list\'s subscription stops');
first.callbacks.onReady();
assert.equal(dialog.cardsLoading.get(), true);
dialog.selectedListId.set('B-list');
w.rerun();
w.subs.filter(s => s.name === 'destinationCards').at(-1).callbacks.onReady();
assert.equal(dialog.selectedCardId.get(), '');
assert.equal(dialog.cardsLoading.get(), false);
});
await test('the open board\'s Filter does not empty the destination dropdown', () => {
const cardSrc = read('client/lib/dialogWithBoardSwimlaneListCard.js');
assert.match(cardSrc, /list\.cardsUnfiltered\(swimlaneId\)/);
assert.doesNotMatch(cardSrc, /list\.cards\(swimlaneId\)/);
});
// ---- every picker of another board's cards uses the subscription --------
await test('negative: no client picker lists another board\'s cards from the board publication alone', () => {
const base = read('client/lib/dialogWithBoardSwimlaneList.js');
const onReady = base.slice(base.indexOf("this.tpl.subscribe('board'"), base.indexOf('onStop:'));
assert.doesNotMatch(onReady, /cards\(\)/, 'the board being ready says nothing about a lazy board\'s cards');
assert.match(read('client/lib/dialogWithBoardSwimlaneListCard.js'), /subscribe\('destinationCards'/);
const details = read('client/components/cards/cardDetails.js');
const parent = details.slice(details.indexOf("'change .js-field-parent-board'"));
assert.match(parent.slice(0, parent.indexOf("'change .js-field-parent-card'")), /subscribe\('destinationCards', selection/);
assert.match(details, /destinationDisabled\(\)[\s\S]{0,400}cardsLoading/);
const listBody = read('client/components/lists/listBody.js');
const link = listBody.slice(listBody.indexOf('Template.linkCardPopup.onCreated'), listBody.indexOf('Template.linkCardPopup.helpers'));
assert.match(link, /subscribe\('destinationCards'/);
const checklists = read('client/components/cards/checklists.js');
assert.match(checklists, /if \(!cardId \|\| !dialog\.cards\(\)\.some/, 'checklist Done needs a card of the list');
assert.match(read('client/components/cards/checklists.jade'), /js-done\(type="button" disabled=doneDisabled\)/);
});
console.log(`destinationCards6917: ${checks} checks passed`);
})().catch(err => {
console.error(err);
process.exit(1);
});
+34
View File
@@ -0,0 +1,34 @@
'use strict';
// build.sh's source test mode (scripts/dev-source) stopped at startup with
// "Cannot find module 'meteor/aldeed:collection2/main'": server/main.js loads
// collection2's main module before the models (2699f4deea), and the source
// runtime resolved only a bare `meteor/<package>`. It now maps
// `meteor/<package>/main` to the same package exports.
const { test } = require('node:test');
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const root = path.join(__dirname, '..');
const runtime = fs.readFileSync(path.join(root, 'scripts/dev-source/runtime.cjs'), 'utf8');
const mainJs = fs.readFileSync(path.join(root, 'server/main.js'), 'utf8');
// The resolver's own regular expression, taken from the runtime.
const pattern = new RegExp(runtime.match(/const mainModule = \/(.+)\/\.exec\(id\);/)[1]);
test('the runtime maps meteor/<package>/main to the package', () => {
assert.match(runtime, /if \(mainModule && Package\[mainModule\[1\]\]\) return path\.join\(state, 'meteor', mainModule\[1\] \+ '\.js'\);/);
assert.equal(pattern.exec('meteor/aldeed:collection2/main')[1], 'aldeed:collection2');
});
test('every meteor/<package>/<path> import in the server entry is one the runtime resolves', () => {
const ids = [...mainJs.matchAll(/require\('(meteor\/[^']+\/[^']+)'\)/g)].map(m => m[1]);
assert.ok(ids.includes('meteor/aldeed:collection2/main'), 'the import this fixes is still there');
for (const id of ids) assert.ok(pattern.test(id), `${id} resolves in source mode`);
});
test('negative: deeper or other sub-paths are not taken for the main module', () => {
for (const id of ['meteor/aldeed:collection2/lib/x', 'meteor/aldeed:collection2/main/x', 'meteor/aldeed:collection2', 'aldeed:collection2/main']) {
assert.equal(pattern.test(id), false, id);
}
});
+11 -6
View File
@@ -115,15 +115,20 @@ test('d is bound once, through the shared filter, to the opened card with canMod
assert.doesNotMatch(fn, /Popup\.open/, 'never opens the popup past the rendered control');
});
test('#6755: with no card opened, d opens the hovered or selected minicard first', () => {
// #6924 changed the minicard half: `d` on a hovered or selected minicard used
// to open the card and then click its Due date control (#6755); now it opens
// only the Due date popup next to the minicard, as a click on the minicard's
// date does, and the card stays closed. The permission it needs is the
// control's own, in client/lib/cardShortcutPopup.js
// (tests/cardShortcutPopup.test.cjs). An opened card still clicks its control.
test('#6755 / #6924: with no card opened, d opens only the popup of the hovered or selected minicard', () => {
const fn = keyboard.slice(keyboard.indexOf('export function openDueDateEditorOfOpenedCard'), keyboard.indexOf("hotkeys('d, shift+d'"));
assert.match(fn, /if \(cardId\) \{\n\s+const card = ReactiveCache\.getCard\(cardId\);\n\s+if \(!card \|\| !Utils\.canModifyCard\(card\)\) return false;\n\s+clickDueDateControlWhenRendered\(cardId\);/,
'an opened card wins, and #6840: its click waits until its details are rendered');
assert.match(fn, /Session\.get\('selectedCard'\) \|\| getHoveredCardId\(\)/, 'the same card the other card shortcuts use');
assert.match(fn, /if \(!minicard \|\| !Utils\.canModifyCard\(minicard\)\) return false;/,
'negative: a card the user may not edit is not even opened');
assert.match(fn, /Utils\.goCardId\(minicardId\)/);
assert.match(fn, /setTimeout\(\(\) => clickDueDateControlWhenRendered\(minicardId\), 0\)/);
assert.match(fn, /return openCardShortcutPopupAtMinicard\('due'\);/);
assert.doesNotMatch(fn, /Utils\.goCardId/, 'negative: #6924 - the minicard\'s card is not opened');
const atMinicard = keyboard.slice(keyboard.indexOf('function openCardShortcutPopupAtMinicard'), keyboard.indexOf('function openCardShortcutPopupWhenRendered'));
assert.match(atMinicard, /Session\.get\('selectedCard'\) \|\| getHoveredCardId\(\)/, 'the same card the other card shortcuts use');
const wait = keyboard.slice(keyboard.indexOf('function clickDueDateControlWhenRendered'), keyboard.indexOf('export function openDueDateEditorOfOpenedCard'));
assert.match(wait, /if \(Utils\.getCurrentCardId\(\) !== cardId\) return;/,
'negative: stops when another card was opened meanwhile - never clicks for a card no longer open');
+96
View File
@@ -0,0 +1,96 @@
'use strict';
// i18next 27 changed `returnEmptyString` to default false: an empty translation
// falls back like a missing one, to the KEY. en.i18n.json keeps some values
// empty on purpose - "comment-placeholder" (the description and comment
// editors have no placeholder) and Blockly's empty suffixes - so after the
// i18next 27 update the editor showed the text "comment-placeholder" (#6921).
// This runs the real __() from imports/i18n/tap.js with the init() options
// read from that same file, so dropping `returnEmptyString: true` fails here.
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const vm = require('node:vm');
const test = require('node:test');
const i18next = require('i18next');
const sprintf = require('i18next-sprintf-postprocessor');
const DATA = path.join(__dirname, '..', 'imports', 'i18n', 'data');
const source = fs.readFileSync(path.join(__dirname, '..', 'imports', 'i18n', 'tap.js'), 'utf8');
const en = JSON.parse(fs.readFileSync(path.join(DATA, 'en.i18n.json'), 'utf8'));
const emptyInEnglish = Object.keys(en).filter(k => en[k] === '');
// The object literal passed to this.i18n.init({...}) in TAPi18n.init().
function initOptions() {
const start = source.indexOf('await this.i18n.init({');
assert.ok(start > 0, 'TAPi18n.init() calls this.i18n.init({...})');
let depth = 0;
let i = source.indexOf('{', start);
const from = i;
for (; i < source.length; i++) {
if (source[i] === '{') depth++;
else if (source[i] === '}' && --depth === 0) break;
}
return vm.runInNewContext(`(${source.slice(from, i + 1)})`, {
DEFAULT_LANGUAGE: 'en', DEFAULT_NAMESPACE: 'translation', process: { env: {} }, languages: {},
});
}
function makeTap(resources) {
const method = source.slice(source.indexOf(' __(key, options, language) {'), source.lastIndexOf('\n};'));
const tap = vm.runInNewContext('({' + method + '})', { DEFAULT_LANGUAGE: 'en' });
tap.current = { dep: { depend() {} } };
tap.revision = { get() {} };
tap.toI18nCode = code => code;
tap.i18n = i18next.createInstance().use(sprintf);
tap.i18n.init({ ...initOptions(), supportedLngs: false, initImmediate: false, lng: 'fi', resources });
return tap;
}
test('the fixture: English really has values that are empty on purpose', () => {
assert.ok(emptyInEnglish.includes('comment-placeholder'), 'the editor placeholder is empty in English');
assert.ok(emptyInEnglish.length > 1, 'and it is not the only one (Blockly suffixes)');
});
test('TAPi18n.init() keeps an empty translation empty (i18next 27 default is false)', () => {
assert.equal(initOptions().returnEmptyString, true);
});
test('an empty translation renders as empty, not as its key (#6921)', () => {
const fi = Object.fromEntries(emptyInEnglish.map(k => [k, '']));
const tap = makeTap({ en: { translation: en }, fi: { translation: { ...fi, comments: 'Kommentit' } } });
for (const key of emptyInEnglish) {
assert.equal(tap.__(key, { sprintf: [] }), '', `${key} in the user's language`);
assert.equal(tap.__(key, { sprintf: [] }, 'en'), '', `${key} in English`);
}
});
test('negative: a missing translation still falls back to English, not to blank or the key', () => {
const tap = makeTap({ en: { translation: en }, fi: { translation: { comments: 'Kommentit' } } });
assert.equal(tap.__('comments'), 'Kommentit');
assert.equal(tap.__('comment'), en.comment, 'a key the language lacks shows English');
assert.equal(tap.__('no-such-key-6921'), 'no-such-key-6921', 'an unknown key is still the key');
});
test('negative: no language has an empty value where English has text', () => {
// With returnEmptyString:true such a value would render blank instead of
// falling back to English, so none may exist.
const blank = [];
for (const file of fs.readdirSync(DATA).filter(f => f.endsWith('.i18n.json'))) {
const strings = JSON.parse(fs.readFileSync(path.join(DATA, file), 'utf8'));
for (const [key, value] of Object.entries(strings)) {
if (value === '' && en[key] !== '' && key in en) blank.push(`${file}: ${key}`);
}
}
assert.deepEqual(blank, []);
});
test('every language leaves the editor placeholder empty, as English does', () => {
// A non-empty value here is not a translation of anything: lb had
// "Optioun: " and haw "Ma ka ʻōlelo Hawaiʻi: " for an empty English source.
const filled = [];
for (const file of fs.readdirSync(DATA).filter(f => f.endsWith('.i18n.json'))) {
const strings = JSON.parse(fs.readFileSync(path.join(DATA, file), 'utf8'));
if ('comment-placeholder' in strings && strings['comment-placeholder'] !== '') filled.push(file);
}
assert.deepEqual(filled, []);
});
@@ -56,7 +56,7 @@ function world() {
getSwimlane: q => docs.swimlanes.find(d => match(d, q)) || null,
getList: q => {
const l = docs.lists.find(d => match(d, q));
return l ? { ...l, cards: sl => docs.cards.filter(c => c.listId === l._id && c.swimlaneId === sl) } : null;
return l ? { ...l, cardsUnfiltered: sl => docs.cards.filter(c => c.listId === l._id && c.swimlaneId === sl) } : null;
},
getCurrentUser: () => ({ getTemplatesBoardId: () => 'T' }),
};
@@ -0,0 +1,93 @@
'use strict';
// #6919: a checklist folded on a minicard unfolded half a second later. The
// fold was stored; the client never saw it, because its copy of the current
// user's profile had shrunk to a few fields. DDP merges only top-level fields,
// and Meteor re-runs named subscriptions before the accounts publication of the
// whole profile on every login, a reconnect included - so a publication that
// sent the current user `profile.fullname` / `.avatarUrl` / ... or
// `profile.showDesktopDragHandles` won, and every preference in the profile
// went back to its default until a reload (#6691 found the same for the board
// view). This test finds every users query with profile subfields in a server
// file that publishes, anywhere, and requires it to leave the current user out.
const { test } = require('node:test');
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const root = path.join(__dirname, '..');
const read = rel => fs.readFileSync(path.join(root, rel), 'utf8');
const { notCurrentUser } = require('../server/lib/notCurrentUser');
test('notCurrentUser keeps the selector and leaves out only the current user', () => {
assert.deepEqual(notCurrentUser({ _id: { $in: ['a', 'b'] } }, 'me'),
{ $and: [{ _id: { $in: ['a', 'b'] } }, { _id: { $ne: 'me' } }] });
assert.deepEqual(notCurrentUser({ username: 'x' }, null), { username: 'x' }, 'no user, nothing to leave out');
assert.deepEqual(notCurrentUser(undefined, 'me'), { $and: [{}, { _id: { $ne: 'me' } }] });
});
function serverFiles(dir) {
const out = [];
for (const entry of fs.readdirSync(path.join(root, dir), { withFileTypes: true })) {
const rel = path.join(dir, entry.name);
if (entry.isDirectory()) {
if (!['tests', 'node_modules'].includes(entry.name) && !entry.name.startsWith('_build')) out.push(...serverFiles(rel));
} else if (entry.name.endsWith('.js')) out.push(rel);
}
return out;
}
// The text of a call from its opening parenthesis to the matching one.
function callText(src, open) {
let depth = 0;
for (let i = open; i < src.length; i++) {
if (src[i] === '(') depth++;
else if (src[i] === ')' && --depth === 0) return src.slice(open, i + 1);
}
return src.slice(open);
}
// Publications that send the current user's preference under a top-level
// field of their own, never as `profile` (see their comments).
const REMAPPED = new Set(['server/publications/userBoardView.js', 'server/publications/userDesktopDragHandles.js']);
test('negative: no publication sends the current user a narrow profile', () => {
const offenders = [];
let checked = 0;
for (const file of serverFiles('server')) {
const src = read(file);
if (!/Meteor\.publish\(|publishComposite\(/.test(src) || REMAPPED.has(file)) continue;
for (const m of src.matchAll(/(?:ReactiveCache\.getUsers|Meteor\.users\.find|Users\.find)\(/g)) {
const call = callText(src, m.index + m[0].length - 1);
if (!/'profile\.[A-Za-z]+'\s*:|Users\.safeFields/.test(call)) continue;
checked++;
// Either form: notCurrentUser() in the selector, or the id list built
// just above it without the current user (boards.js, before this test).
const before = src.slice(Math.max(0, m.index - 400), m.index);
if (/notCurrentUser\(/.test(call) || /!==\s*thisUserId/.test(call) || /=>\s*[^;]*!==\s*thisUserId\)\)?\]?;?\s*\n[\s\S]*$/.test(before)) continue;
offenders.push(`${file}:${src.slice(0, m.index).split('\n').length}`);
}
}
assert.ok(checked >= 9, `the scan found the narrow-profile user queries (${checked})`);
assert.deepEqual(offenders, [], 'each must leave the current user out: server/lib/notCurrentUser.js');
});
test('userDesktopDragHandles publishes a top-level field, never profile', () => {
const src = read('server/publications/userDesktopDragHandles.js');
assert.match(src, /return \{ desktopDragHandlesPreference: typeof value === 'boolean' \? value : null \};/);
assert.match(src, /this\.added\('users', id, preference\(fields\)\)/);
assert.match(src, /this\.changed\('users', id, preference\(fields\)\)/);
assert.doesNotMatch(src.replace(/\/\/.*$/gm, ''), /return Meteor\.users\.find/, 'negative: no plain cursor of profile fields');
const utils = read('client/lib/utils.js');
const fn = utils.slice(utils.indexOf('dragHandlesPreference() {'), utils.indexOf('return readDragHandlesPreference(stored);'));
assert.match(fn, /currentUserWith\(\['profile\.showDesktopDragHandles', 'desktopDragHandlesPreference'\]\)/);
assert.match(fn, /fromProfile !== undefined \? fromProfile : currentUser\.desktopDragHandlesPreference/);
});
test('the current user\'s own row keeps its columns: user-admin publishes them', () => {
const src = read('server/publications/users.js');
const admin = src.slice(src.indexOf("Meteor.publish('user-admin'"), src.indexOf("Meteor.publish('user-authenticationMethod'"));
for (const field of ['isAdmin', 'teams', 'orgs', 'authenticationMethod', 'createdAt', 'loginDisabled', 'lastConnectionDate', 'importUsernames']) {
assert.match(admin, new RegExp(`${field}: 1`), field);
}
assert.match(admin, /Meteor\.users\.find\(this\.userId,/, 'own document only');
});
+12 -12
View File
@@ -9,7 +9,7 @@
"mongodb": "^7.8.0"
},
"devDependencies": {
"@playwright/test": "^1.64.1",
"@playwright/test": "^1.65.0",
"axe-core": "^4.14.0"
}
},
@@ -23,13 +23,13 @@
}
},
"node_modules/@playwright/test": {
"version": "1.64.1",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.64.1.tgz",
"integrity": "sha512-IaYGml/nSOiZWROfPtuIL7neuu9qDOZ3TNvNljUIrhDMxiGTgPjzj/g9p9RxpS2tSepPDRY+UwAaEeiKtUvIAg==",
"version": "1.65.0",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.65.0.tgz",
"integrity": "sha512-iGURLGuKDLakSEl7Pgfv8h7f+XLT+V861Wfhz0zlEl5nyFuKUopdkFBPKqTllTUp06aOwPuH8iuUEb3yp3MpbQ==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"playwright": "1.64.1"
"playwright": "1.65.0"
},
"bin": {
"playwright": "cli.js"
@@ -138,13 +138,13 @@
}
},
"node_modules/playwright": {
"version": "1.64.1",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.64.1.tgz",
"integrity": "sha512-HCrVhHr5QQuwYoswEUGTb7gGp522yflbv/ST8nF4sFWGuLjQCt17Q/EubpGGSNKYn1tsTCPZxqHhHCfVURu7UA==",
"version": "1.65.0",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.65.0.tgz",
"integrity": "sha512-F3AMWcR44qMBt4kq+6Kb6mX7bjGXshktKFOPULd7reED6ZJWevjbNRqysP7q+AATE9kdPEZBibex1BYsvpVoeA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"playwright-core": "1.64.1"
"playwright-core": "1.65.0"
},
"bin": {
"playwright": "cli.js"
@@ -154,9 +154,9 @@
}
},
"node_modules/playwright-core": {
"version": "1.64.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.64.1.tgz",
"integrity": "sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ==",
"version": "1.65.0",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.65.0.tgz",
"integrity": "sha512-vNSKgH6YqtN7cdT/L334zo0a+YwkrpicyrHJlWWPIm/Q+Nn2SWInil01oT0mbu96U4GgoRtCYQD9CzJQgju+lA==",
"dev": true,
"license": "Apache-2.0",
"bin": {
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "wekan-playwright-tests",
"private": true,
"devDependencies": {
"@playwright/test": "^1.64.1",
"@playwright/test": "^1.65.0",
"axe-core": "^4.14.0"
},
"dependencies": {
@@ -138,6 +138,15 @@ test.describe('Card members & description', () => {
// The description form inside: .js-new-description with form.js-new-description-form
const descForm = cp.root.locator('.js-card-description, .js-new-description').first();
await expect(descForm).toBeVisible({ timeout: 6_000 });
// #6921: the placeholder is empty in en.i18n.json on purpose. i18next 27
// turned an empty translation into its key, so the editor showed the
// text "comment-placeholder"; it has no placeholder text at all.
const editor = descForm.locator('textarea.editor').first();
await expect(editor).toBeVisible({ timeout: 6_000 });
const placeholder = await editor.getAttribute('placeholder');
expect(placeholder || '').not.toContain('comment-placeholder');
expect(placeholder || '').toBe('');
} else {
console.log('Note: description pencil-open trigger not found');
await expect(cp.root).toBeVisible({ timeout: 3_000 });
@@ -0,0 +1,40 @@
'use strict';
const { test, expect } = require('../fixtures');
const db = require('../helpers/db');
const { solidPng } = require('../helpers/images');
test('normalized upload names retain their attachment, bytes and card display', async ({ request, user, board, boardPage: page }) => {
const png = await solidPng(page, 20, 20, '#3366aa');
const card = db.findOne('cards', { boardId: board.boardId, title: 'Alpha Card' });
const headers = { Authorization: `Bearer ${user.token}` };
for (const fileName of ['short.png', 'a'.repeat(37) + '.png', 'wrong-extension.txt']) {
const query = new URLSearchParams({
boardId: board.boardId, swimlaneId: board.swimlaneId,
listId: card.listId, cardId: card._id, fileName, fileType: 'image/png',
});
const response = await request.post(`/api/attachment/upload?${query}`, {
headers: { ...headers, 'Content-Type': 'application/octet-stream' }, data: png,
});
expect(response.status()).toBe(200);
const { success, attachmentId } = await response.json();
expect(success).toBe(true);
const name = fileName.endsWith('.txt') ? 'wrong-extension.png'
: fileName.length > 30 ? `${fileName.slice(0, 26)}.png` : fileName;
await expect.poll(() => {
const stored = db.findOne('attachments', { _id: attachmentId });
return stored && { name: stored.name, matchingPaths: stored.path === stored.versions.original.path };
}).toEqual({ name, matchingPaths: true });
const metadata = await request.get(`/api/attachment/info/${attachmentId}`, { headers });
expect(metadata.status()).toBe(200);
const download = await request.get(`/api/attachment/download/${attachmentId}?raw=1`, { headers });
expect(download.status()).toBe(200);
expect(await download.body()).toEqual(png);
await page.reload();
await page.locator('.minicard', { hasText: 'Alpha Card' }).first().locator('.minicard-title').click();
await expect(page.locator(`img.attachment-thumbnail[title="${name}"]`)).toBeVisible();
expect(db.findOne('attachments', { _id: attachmentId })).not.toBeNull();
}
});
@@ -0,0 +1,46 @@
'use strict';
/**
* #6917: Copy Checklist to a board that loads lazily. The destination's card
* dropdown read the `board` publication, which ships no cards for a board over
* the lazy threshold, so it stayed empty. tests/destinationCards6917.test.cjs
* runs the publication and the dialog; this runs the popup against a real
* server whose destination board stays over the threshold while it is open.
*/
const { test, expect } = require('../fixtures');
const db = require('../helpers/db');
const BoardPage = require('../pages/BoardPage');
const CardPage = require('../pages/CardPage');
test('copy a checklist to a card of a lazily loaded board', async ({ boardPage: page, board, user }) => {
const dest = db.seedBoard({ ownerId: user.id, title: 'Large destination', cardTitlesPerList: [['Target card']] });
const threshold = await page.evaluate(() => Meteor.settings.public.cardsLoadingLazyThreshold ?? 500);
const template = db.findOne('cards', { boardId: dest.boardId, title: 'Target card' });
// The padding lives in another list, so the target list holds one card.
db.insertMany('cards', Array.from({ length: threshold + 1 }, (_, i) => ({ ...template,
_id: db.uid('lazy-padding'), title: 'Lazy padding', listId: dest.listIds[1], sort: 1000 + i })));
try {
await new BoardPage(page).clickCard(board.listIds[0], 'Alpha Card');
const card = new CardPage(page);
await card.waitForOpen();
await card.addChecklist('Template steps');
await card.root.locator('.js-checklist').filter({ hasText: 'Template steps' }).first()
.locator('.js-open-checklist-details-menu').click();
const pop = page.locator('.js-pop-over');
await pop.locator('.js-copy-checklist').click();
await pop.locator('.js-select-boards').selectOption(dest.boardId);
await expect(pop.locator('.js-select-lists option')).not.toHaveCount(0);
await pop.locator('.js-select-lists').selectOption(dest.listIds[0]);
await expect(pop.locator('.js-select-cards option', { hasText: 'Target card' })).toHaveCount(1);
// Negative: the dropdown holds the chosen list's cards, not the padding.
await expect(pop.locator('.js-select-cards option', { hasText: 'Lazy padding' })).toHaveCount(0);
await expect(pop.locator('.js-done')).toBeEnabled();
await pop.locator('.js-done').click();
await expect.poll(() => db.countDocuments('checklists', { cardId: template._id, title: 'Template steps' })).toBe(1);
} finally {
db.cleanup({ boardIds: [dest.boardId] });
}
});
@@ -87,19 +87,26 @@ test.describe('#6750 due date keyboard shortcut', () => {
});
// #6755: "d" did nothing until the card was opened. On a hovered minicard it
// opens that card and its Due date editor.
test('d on a hovered minicard opens the card and its Due date editor (#6755)', async ({ page, user, board }) => {
// opens its Due date editor - and #6924: ONLY the editor, next to the
// minicard, as a click on the minicard's date does. The card stays closed.
test('d on a hovered minicard opens only its Due date editor, not the card (#6755, #6924)', async ({ page, user, board }) => {
// #6755: a user whose profile has no keyboardShortcuts value has them ON.
db.updateOne('users', { _id: user.id }, { $unset: { 'profile.keyboardShortcuts': '' } });
const card = db.findOne('cards', { boardId: board.boardId, title: 'Alpha Card' });
await loginWithToken(page, user.id, user.token);
await openBoard(page, board.boardId, board.slug);
const url = page.url();
await page.locator('.js-minicard', { hasText: 'Alpha Card' }).first().hover();
await page.evaluate(() => document.activeElement && document.activeElement.blur());
await page.keyboard.press('d');
await expect(page).toHaveURL(new RegExp(`/${card._id}$`));
await expect(dueDatePopup(page)).toBeVisible({ timeout: 8_000 });
expect(page.url(), 'the card is not opened').toBe(url);
await expect(page.locator('.js-card-details')).toHaveCount(0);
// The popup edits THIS card's due date.
await dueDatePopup(page).locator('.js-calendar-day, .selected-calendar-picker').first().waitFor();
await page.keyboard.press('Escape');
await expect(dueDatePopup(page)).toHaveCount(0);
expect(db.findOne('cards', { _id: card._id }).dueAt || null).toBe(null);
});
// #6840: on a slow server the card's details render a few hundred
@@ -160,9 +167,12 @@ test.describe('#6750 due date keyboard shortcut', () => {
expect(await page.evaluate(() => document.activeElement?.matches('a.js-minicard[href]')),
'the minicard link has the focus').toBe(true);
await minicard.hover();
const url = page.url();
await page.keyboard.press('d');
await expect(page).toHaveURL(new RegExp(`/${card._id}$`));
await expect(dueDatePopup(page)).toBeVisible({ timeout: 8_000 });
// #6924: only the popup; the card stays closed.
expect(page.url()).toBe(url);
expect(card._id).toBeTruthy();
await page.keyboard.press('Escape');
});
@@ -0,0 +1,136 @@
'use strict';
// #6919: the checklist caret on a minicard folded the checklist and, half a
// second later, unfolded it again - the client applied the fold and the
// server's answer took it back. The reporter's board is Persian (right to
// left), in the Swimlanes view with one shared list header row, and the user
// is a member of the cards. Every shape here is a board like that, opened as a
// returning user opens it (a page load that logs in from the cookie), and each
// fold must still be there seconds later, in the database and on the client.
const { test, expect } = require('../fixtures');
const db = require('../helpers/db');
function addChecklist(cardId, boardId, title, items = 3) {
const id = db.uid('check');
db.insertOne('checklists', { _id: id, cardId, boardId, title, sort: 0,
showChecklistAtMinicard: true, createdAt: new Date() });
for (let i = 0; i < items; i++) {
db.insertOne('checklistItems', { _id: db.uid('item'), checklistId: id, cardId, boardId,
title: `${title} ${i + 1}`, sort: i, isFinished: false, createdAt: new Date(), modifiedAt: new Date() });
}
return id;
}
function addSecondLane(board, user) {
const lane = db.uid('swim'); const cardId = db.uid('card'); const now = new Date();
db.insertOne('swimlanes', { _id: lane, title: 'Second lane', boardId: board.boardId, sort: 2, type: 'swimlane',
archived: false, createdAt: now, updatedAt: now, modifiedAt: now });
db.insertOne('cards', { _id: cardId, title: 'Second lane card', boardId: board.boardId, swimlaneId: lane,
listId: board.listIds[0], sort: 0, archived: false, userId: user.id, members: [user.id],
type: 'cardType-card', createdAt: now, modifiedAt: now, dateLastActivity: now });
return cardId;
}
const alpha = board => db.findOne('cards', { boardId: board.boardId, title: 'Alpha Card' });
// Each returns the minicard to click on and the checklist shown on it.
const shapes = {
'the reporter\'s card': ({ board, user }) => {
const card = alpha(board);
db.updateOne('cards', { _id: card._id }, { $set: { members: [user.id] } });
const checklistId = addChecklist(card._id, board.boardId, 'Group 1', 4);
addChecklist(card._id, board.boardId, 'Group 2', 5);
return { cardId: card._id, title: 'Group 1', checklistId };
},
'the second of two checklists': ({ board }) => {
const card = alpha(board);
addChecklist(card._id, board.boardId, 'Group 1');
const checklistId = addChecklist(card._id, board.boardId, 'Group 2', 5);
return { cardId: card._id, title: 'Group 2', checklistId };
},
'a linked card': ({ board }) => {
const card = alpha(board);
const checklistId = addChecklist(card._id, board.boardId, 'Group 1');
const linkedId = db.uid('link');
db.insertOne('cards', { ...card, _id: linkedId, listId: board.listIds[1], linkedId: card._id,
type: 'cardType-linkedCard', title: 'Linked Alpha', sort: 50 });
return { cardId: linkedId, title: 'Group 1', checklistId };
},
'a user with many earlier folds': ({ board, user }) => {
const card = alpha(board);
const checklistId = addChecklist(card._id, board.boardId, 'Group 1');
const folds = {};
for (let i = 0; i < 300; i++) folds[db.uid('old')] = { 'checklist-old': true, labels: false };
db.updateOne('users', { _id: user.id }, { $set: { 'profile.collapsedCardSections': folds } });
return { cardId: card._id, title: 'Group 1', checklistId, earlierFolds: 300 };
},
'one shared list header row, first swimlane': ({ board, user }) => {
db.updateOne('users', { _id: user.id }, { $set: { 'profile.boardView': 'board-view-swimlanes' } });
db.updateOne('boards', { _id: board.boardId }, { $set: { sharedListHeaders: true } });
const card = alpha(board);
const checklistId = addChecklist(card._id, board.boardId, 'Group 1');
addSecondLane(board, user);
return { cardId: card._id, title: 'Group 1', checklistId };
},
'one shared list header row, second swimlane': ({ board, user }) => {
db.updateOne('users', { _id: user.id }, { $set: { 'profile.boardView': 'board-view-swimlanes' } });
db.updateOne('boards', { _id: board.boardId }, { $set: { sharedListHeaders: true } });
const cardId = addSecondLane(board, user);
const checklistId = addChecklist(cardId, board.boardId, 'Group 1');
return { cardId, title: 'Group 1', checklistId };
},
};
async function expectFold(page, caret, items, folded, count) {
await expect(caret).toHaveAttribute('aria-expanded', folded ? 'false' : 'true');
await expect(items).toHaveCount(folded ? 0 : count);
// The server's answer arrives after the click: the fold must survive it.
await page.waitForTimeout(2500);
await expect(caret, 'the server did not take the fold back')
.toHaveAttribute('aria-expanded', folded ? 'false' : 'true');
}
for (const [shape, setup] of Object.entries(shapes)) {
for (const reconnect of [false, true]) {
test(`minicard checklist caret: ${shape}${reconnect ? ', after a reconnect' : ''} (#6919)`, async ({ boardPage: page, board, user }) => {
db.updateOne('users', { _id: user.id }, { $set: { 'profile.language': 'fa' } });
const { cardId, title, checklistId, earlierFolds } = setup({ board, user });
const count = db.countDocuments('checklistItems', { checklistId });
await page.reload();
if (reconnect) {
// The connection drops and comes back (sleep, a network change, a
// server restart), and the client logs in again on the new one.
await expect.poll(() => page.evaluate(() => !!window.Meteor?.userId())).toBe(true);
await page.evaluate(() => { window.Meteor.disconnect(); window.Meteor.reconnect(); });
await expect.poll(() => page.evaluate(() =>
window.Meteor.status().connected && !!window.Meteor.userId() && !window.Meteor.loggingIn())).toBe(true);
}
const minicard = page.locator(`.js-minicard[data-card-id="${cardId}"]`).first();
const group = minicard.locator('.minicard-checklist').filter({ hasText: title }).first();
const caret = group.locator('.js-collapse-checklist');
const items = group.locator('.js-checklist-item');
await expectFold(page, caret, items, false, count);
await caret.click();
await expectFold(page, caret, items, true, count);
const key = `checklist-${checklistId}`;
const stored = db.findOne('users', { _id: user.id }).profile.collapsedCardSections;
expect(stored[cardId][key]).toBe(true);
expect(await page.evaluate(([c, k]) =>
window.Meteor.user().profile.collapsedCardSections?.[c]?.[k], [cardId, key])).toBe(true);
// Folding keeps the user's other folds, and does not open the card.
if (earlierFolds) expect(Object.keys(stored)).toHaveLength(earlierFolds + 1);
await expect(page.locator('.card-details')).toHaveCount(0);
await caret.click();
await expectFold(page, caret, items, false, count);
// Folded again, it stays folded across another page load.
await caret.click();
await expectFold(page, caret, items, true, count);
await page.reload();
await expect(caret).toHaveAttribute('aria-expanded', 'false');
await expect(items).toHaveCount(0);
});
}
}
@@ -48,9 +48,11 @@ test.describe('#6904 Move and Copy card keyboard shortcuts', () => {
expect(db.getCard(card._id).archived).not.toBe(true);
await page.goto('/shortcuts');
const items = page.locator('.shortcuts-list-item');
await expect(items.filter({ hasText: 'Move Card' })).toHaveCount(1);
await expect(items.filter({ hasText: 'Copy Card' })).toHaveCount(1);
// Exact action text: "Move Card to Archive" (the c shortcut) also contains
// "Move Card", so a substring match counted two.
const actions = page.locator('.shortcuts-list-item .shortcuts-list-item-action');
await expect(actions.filter({ hasText: /^\s*Move Card\s*$/ })).toHaveCount(1);
await expect(actions.filter({ hasText: /^\s*Copy Card\s*$/ })).toHaveCount(1);
});
test('negative: nothing opens when keyboard shortcuts are disabled', async ({ page, user, board }) => {
@@ -85,4 +87,63 @@ test.describe('#6904 Move and Copy card keyboard shortcuts', () => {
await page.keyboard.press('Shift+C');
await expect(picker(page)).toBeVisible({ timeout: 8_000 });
});
// #6924: the shortcut opens ONLY its popup. On an opened card, the hamburger
// menu is not shown first; on a hovered minicard, the card is not opened.
const cardMenu = page => page.locator('.js-pop-over .pop-over-list .js-move-card, .js-pop-over .pop-over-list .js-copy-card');
test('on an opened card, Shift+M opens Move card without showing the card menu (#6924)', async ({ page, user, board }) => {
await openAlphaCard(page, user, board, true);
await page.keyboard.press('Shift+M');
await expect(picker(page)).toBeVisible({ timeout: 8_000 });
await expect(cardMenu(page)).toHaveCount(0);
await expect(page.locator('.js-pop-over')).toHaveCount(1);
});
async function hoverAlpha(page, who, board, shortcutsOn = true) {
db.updateOne('users', { _id: who.id }, { $set: { 'profile.keyboardShortcuts': shortcutsOn } });
await loginWithToken(page, who.id, who.token);
await openBoard(page, board.boardId, board.slug);
await page.locator('.js-minicard', { hasText: 'Alpha Card' }).first().hover();
await page.evaluate(() => document.activeElement && document.activeElement.blur());
return page.url();
}
test('on a hovered minicard, Shift+M and Shift+C open only their popup, and the card stays closed (#6924)', async ({ page, user, board }) => {
const url = await hoverAlpha(page, user, board);
await page.keyboard.press('Shift+M');
await expect(picker(page)).toBeVisible({ timeout: 8_000 });
await expect(picker(page).locator('#move-card-title')).toHaveValue('Alpha Card');
expect(page.url(), 'the card is not opened').toBe(url);
await expect(page.locator('.js-card-details')).toHaveCount(0);
await expect(cardMenu(page)).toHaveCount(0);
await page.keyboard.press('Escape');
await expect(picker(page)).toHaveCount(0);
await page.locator('.js-minicard', { hasText: 'Alpha Card' }).first().hover();
await page.evaluate(() => document.activeElement && document.activeElement.blur());
await page.keyboard.press('Shift+C');
await expect(picker(page)).toBeVisible({ timeout: 8_000 });
await expect(picker(page).locator('#copy-card-title')).toHaveValue('Alpha Card');
expect(page.url()).toBe(url);
await expect(page.locator('.js-card-details')).toHaveCount(0);
});
test('negative: on a hovered minicard, a member who is not a board admin gets no Move card (#6924)', async ({ page, user2, board }) => {
db.addBoardMember({ boardId: board.boardId, userId: user2.id, isAdmin: false });
const url = await hoverAlpha(page, user2, board);
await page.keyboard.press('Shift+M');
await page.waitForTimeout(1500);
await expect(page.locator('.js-pop-over')).toHaveCount(0);
expect(page.url()).toBe(url);
});
test('negative: on a hovered minicard, nothing opens when keyboard shortcuts are disabled (#6924)', async ({ page, user, board }) => {
const url = await hoverAlpha(page, user, board, false);
await page.keyboard.press('Shift+M');
await page.keyboard.press('Shift+C');
await page.waitForTimeout(800);
await expect(page.locator('.js-pop-over')).toHaveCount(0);
expect(page.url()).toBe(url);
});
});
@@ -0,0 +1,136 @@
'use strict';
const { test, expect } = require('../fixtures');
const db = require('../helpers/db');
const { solidPng } = require('../helpers/images');
const CardPage = require('../pages/CardPage');
const headers = token => ({ Authorization: `Bearer ${token}` });
const cardPath = card => `/api/boards/${card.boardId}/lists/${card.listId}/cards/${card._id}`;
test.afterEach(async ({ board }) => {
db.deleteMany('changeHistory', { boardId: board.boardId });
});
for (const bulk of [false, true]) {
test(`${bulk ? 'bulk' : 'single'} card deletion soft-deletes its attachments and keeps other cards' files`, async ({ request, user, user2, board, boardPage: page }) => {
const card = db.findOne('cards', { boardId: board.boardId, title: 'Alpha Card' });
const sibling = db.findOne('cards', { boardId: board.boardId, title: 'Beta Card' });
const png = await solidPng(page, 16, 16, '#3366aa');
async function upload(target, name) {
const query = new URLSearchParams({
boardId: board.boardId, swimlaneId: board.swimlaneId,
listId: target.listId, cardId: target._id, fileName: name, fileType: 'image/png',
});
const response = await request.post(`/api/attachment/upload?${query}`, {
headers: { ...headers(user.token), 'Content-Type': 'application/octet-stream' }, data: png,
});
expect(response.status()).toBe(200);
const { attachmentId } = await response.json();
const download = await request.get(`/api/attachment/download/${attachmentId}?raw=1`, { headers: headers(user.token) });
expect(download.status()).toBe(200);
expect(await download.body()).toEqual(png);
return attachmentId;
}
const attachmentId = await upload(card, 'removed.png');
const alreadyDeletedId = await upload(card, 'earlier.png');
const siblingId = await upload(sibling, 'retained.png');
const earlierDelete = await request.delete(`/api/attachment/delete/${alreadyDeletedId}`, { headers: headers(user.token) });
expect(earlierDelete.status()).toBe(200);
const alreadyDeleted = db.findOne('attachments', { _id: alreadyDeletedId });
expect(alreadyDeleted.deletedAt).toBeTruthy();
const before = db.findOne('attachments', { _id: attachmentId });
const otherBefore = db.findOne('attachments', { _id: siblingId });
db.updateOne('cards', { _id: card._id }, { $set: { coverId: attachmentId } });
// Rejected requests must not reach the attachment cascade.
const route = bulk ? `/api/boards/${board.boardId}/cards/bulk` : cardPath(card);
const data = bulk ? { cardIds: [card._id] } : undefined;
const denied = await request.delete(route, { headers: headers(user2.token), data });
expect(denied.status()).toBe(403);
if (!bulk) {
const wrongList = await request.delete(cardPath({ ...card, listId: sibling.listId }), { headers: headers(user.token) });
expect(wrongList.status()).toBe(404);
}
expect(db.findOne('attachments', { _id: attachmentId })).toEqual(before);
await page.locator('.minicard', { hasText: 'Alpha Card' }).first().locator('.minicard-title').click();
await expect(page.locator('img.attachment-thumbnail[title="removed.png"]')).toBeVisible();
const response = await request.delete(route, { headers: headers(user.token), data });
expect(response.status()).toBe(200);
expect(await response.json()).toEqual(bulk ? { deleted: [card._id], notFound: [] } : { _id: card._id });
expect(db.findOne('cards', { _id: card._id })).toBeNull();
const deleted = db.findOne('attachments', { _id: attachmentId });
expect(deleted).toMatchObject({ deletedBy: user.id, meta: before.meta, versions: before.versions });
expect(deleted.deletedAt).toBeTruthy();
expect(deleted.deleteBatchId).toBeTruthy();
expect(db.findOne('attachments', { _id: alreadyDeletedId })).toEqual(alreadyDeleted);
expect(db.findOne('attachments', { _id: siblingId })).toEqual(otherBefore);
expect(db.countDocuments('changeHistory', { entityType: 'attachment', entityId: attachmentId, changeType: 'removed', userId: user.id })).toBe(1);
expect(db.countDocuments('activities', { attachmentId, activityType: 'deleteAttachment' })).toBe(1);
const list = await request.get(`/api/attachment/list/${board.boardId}`, { headers: headers(user.token) });
expect(list.status()).toBe(200);
expect((await list.json()).attachments.map(a => a.attachmentId)).toEqual([siblingId]);
// Soft-deleted files remain readable for history/recovery; only active
// attachment listings must stop returning them.
const retained = await request.get(`/api/attachment/download/${attachmentId}?raw=1`, { headers: headers(user.token) });
expect(retained.status()).toBe(200);
expect(await retained.body()).toEqual(png);
const download = await request.get(`/api/attachment/download/${siblingId}?raw=1`, { headers: headers(user.token) });
expect(download.status()).toBe(200);
expect(await download.body()).toEqual(png);
await page.reload();
await expect(page.locator('.minicard', { hasText: 'Alpha Card' })).toHaveCount(0);
await page.locator('.minicard', { hasText: 'Beta Card' }).first().locator('.minicard-title').click();
await expect(page.locator('img.attachment-thumbnail[title="retained.png"]')).toBeVisible();
});
}
test('deleting a card through its UI soft-deletes uploaded attachments and preserves sibling files', async ({ request, user, board, boardPage: page }) => {
const details = new CardPage(page);
const card = db.findOne('cards', { boardId: board.boardId, title: 'Alpha Card' });
const sibling = db.findOne('cards', { boardId: board.boardId, title: 'Beta Card' });
const png = await solidPng(page, 16, 16, '#3366aa');
async function upload(target, name) {
await page.locator('.minicard', { hasText: target.title }).first().locator('.minicard-title').click();
await details.waitForOpen();
await details.openAttachmentPanel();
await page.locator('.js-pop-over input.js-attach-file').setInputFiles({ name, mimeType: 'image/png', buffer: png });
await expect(details.root.locator(`img.attachment-thumbnail[title="${name}"]`)).toBeVisible();
await expect.poll(() => db.countDocuments('attachments', { 'meta.cardId': target._id, name })).toBe(1);
const attachment = db.findOne('attachments', { 'meta.cardId': target._id, name });
const download = await request.get(`/api/attachment/download/${attachment._id}?raw=1`, { headers: headers(user.token) });
expect(download.status()).toBe(200);
expect(await download.body()).toEqual(png);
return attachment;
}
const otherBefore = await upload(sibling, 'retained.png');
await details.close();
const before = await upload(card, 'removed.png');
await details.openActionsMenu();
await details.clickAction('.js-more');
await details.clickAction('.js-delete');
await page.locator('.js-pop-over button.js-confirm').click();
await expect.poll(() => db.findOne('cards', { _id: card._id })).toBeNull();
await expect(page.locator('.minicard', { hasText: 'Alpha Card' })).toHaveCount(0);
await expect(details.root).toBeHidden();
const deleted = db.findOne('attachments', { _id: before._id });
expect(deleted).toMatchObject({ deletedBy: user.id, meta: before.meta, versions: before.versions });
expect(deleted.deletedAt).toBeTruthy();
expect(deleted.deleteBatchId).toBeTruthy();
expect(db.findOne('attachments', { _id: otherBefore._id })).toEqual(otherBefore);
expect(db.countDocuments('changeHistory', { entityType: 'attachment', entityId: before._id, changeType: 'removed', userId: user.id })).toBe(1);
expect(db.countDocuments('activities', { attachmentId: before._id, activityType: 'deleteAttachment' })).toBe(1);
const list = await request.get(`/api/attachment/list/${board.boardId}`, { headers: headers(user.token) });
expect(list.status()).toBe(200);
expect((await list.json()).attachments.map(a => a.attachmentId)).toEqual([otherBefore._id]);
const retained = await request.get(`/api/attachment/download/${before._id}?raw=1`, { headers: headers(user.token) });
expect(retained.status()).toBe(200);
expect(await retained.body()).toEqual(png);
await page.reload();
await expect(page.locator('.minicard', { hasText: 'Alpha Card' })).toHaveCount(0);
await page.locator('.minicard', { hasText: 'Beta Card' }).first().locator('.minicard-title').click();
await expect(details.root.locator('img.attachment-thumbnail[title="retained.png"]')).toBeVisible();
});
@@ -0,0 +1,130 @@
'use strict';
const { test: base, expect } = require('../fixtures');
const db = require('../helpers/db');
const BoardPage = require('../pages/BoardPage');
const CardPage = require('../pages/CardPage');
const headers = token => ({ Authorization: `Bearer ${token}` });
const fieldPath = (boardId, id) => `/api/boards/${boardId}/custom-fields/${id}`;
const items = [{ _id: 'first', name: 'First option' }, { _id: 'second', name: 'Second option' }];
const test = base.extend({
dropdown: async ({ request, user, board }, use) => {
const response = await request.post(`/api/boards/${board.boardId}/custom-fields`, {
headers: headers(user.token),
data: { name: 'Priority', type: 'dropdown', settings: { dropdownItems: items }, showOnCard: true },
});
expect(response.status()).toBe(200);
const { _id } = await response.json();
try {
await use({ id: _id, path: fieldPath(board.boardId, _id) });
} finally {
db.deleteOne('customFields', { _id });
}
},
});
test('renaming dropdown options persists their names without changing siblings or card selections', async ({ request, user, board, dropdown }) => {
const card = db.findOne('cards', { boardId: board.boardId, title: 'Alpha Card' });
db.updateOne('cards', { _id: card._id }, { $set: { customFields: [{ _id: dropdown.id, value: 'second' }] } });
const before = db.getCard(card._id);
const expected = items.map(item => ({ ...item }));
for (const [index, name] of [[1, 'Renamed option'], [0, 'First renamed'], [1, 'Renamed again']]) {
const response = await request.put(`${dropdown.path}/dropdown-items/${items[index]._id}`, {
headers: headers(user.token), data: { name },
});
expect(response.status()).toBe(200);
expect(await response.json()).toEqual({ _id: items[index]._id });
expected[index].name = name;
expect(db.findOne('customFields', { _id: dropdown.id }).settings.dropdownItems).toEqual(expected);
const read = await request.get(dropdown.path, { headers: headers(user.token) });
expect(read.status()).toBe(200);
expect((await read.json()).settings.dropdownItems).toEqual(expected);
expect(db.getCard(card._id)).toEqual(before);
}
});
test('missing options, missing fields and wrong boards return JSON 404 without mutations', async ({ request, user, board, dropdown }) => {
const other = db.seedBoard({ ownerId: user.id });
try {
const before = db.findOne('customFields', { _id: dropdown.id });
for (const path of [
`${dropdown.path}/dropdown-items/missing`,
`${fieldPath(board.boardId, 'missing-field')}/dropdown-items/second`,
`${fieldPath(other.boardId, dropdown.id)}/dropdown-items/second`,
]) {
const response = await request.put(path, { headers: headers(user.token), data: { name: 'Rejected' } });
expect(response.status()).toBe(404);
expect(response.headers()['content-type']).toContain('application/json');
expect(await response.json()).toEqual({ error: 'Dropdown item not found' });
expect(db.findOne('customFields', { _id: dropdown.id })).toEqual(before);
}
} finally {
db.cleanup({ boardIds: [other.boardId] });
}
});
test('dropdown renaming preserves write authorization and protected-field restrictions', async ({ request, user, user2, board, dropdown }) => {
const path = `${dropdown.path}/dropdown-items/second`;
const before = db.findOne('customFields', { _id: dropdown.id });
expect((await request.put(path, { data: { name: 'Rejected' } })).status()).toBe(401);
expect((await request.put(path, { headers: headers(user2.token), data: { name: 'Rejected' } })).status()).toBe(403);
expect(db.findOne('customFields', { _id: dropdown.id })).toEqual(before);
const member = db.seedUser();
try {
db.addBoardMember({ boardId: board.boardId, userId: member.id });
const renamed = await request.put(path, { headers: headers(member.token), data: { name: 'Member rename' } });
expect(renamed.status()).toBe(200);
for (const protection of ['adminOnly', 'readOnly']) {
db.updateOne('customFields', { _id: dropdown.id }, { $set: { adminOnly: false, readOnly: false, [protection]: true } });
const protectedField = db.findOne('customFields', { _id: dropdown.id });
const rejected = await request.put(path, { headers: headers(member.token), data: { name: 'Rejected' } });
expect(rejected.ok()).toBe(false);
expect(db.findOne('customFields', { _id: dropdown.id })).toEqual(protectedField);
const allowed = await request.put(path, { headers: headers(user.token), data: { name: 'Admin rename' } });
expect(allowed.status()).toBe(200);
expect(db.findOne('customFields', { _id: dropdown.id }).settings.dropdownItems).toEqual([items[0], { ...items[1], name: 'Admin rename' }]);
}
} finally {
db.cleanup({ userIds: [member.id] });
}
});
test('URL-encoded option IDs can be renamed and invalid names remain rejected', async ({ request, user, dropdown }) => {
const id = 'option / % +';
db.updateOne('customFields', { _id: dropdown.id }, { $set: { 'settings.dropdownItems.1._id': id } });
const path = `${dropdown.path}/dropdown-items/${encodeURIComponent(id)}`;
const renamed = await request.put(path, { headers: headers(user.token), data: { name: 'Encoded option' } });
expect(renamed.status()).toBe(200);
expect(await renamed.json()).toEqual({ _id: id });
const before = db.findOne('customFields', { _id: dropdown.id });
expect(before.settings.dropdownItems).toEqual([items[0], { _id: id, name: 'Encoded option' }]);
const rejected = await request.put(path, { headers: headers(user.token), data: { name: '' } });
expect(rejected.ok()).toBe(false);
expect(db.findOne('customFields', { _id: dropdown.id })).toEqual(before);
});
test('renamed dropdown choices appear on the card while retaining the selected option', async ({ request, user, board, dropdown, boardPage: page }) => {
const card = db.findOne('cards', { boardId: board.boardId, title: 'Alpha Card' });
db.updateOne('cards', { _id: card._id }, { $set: { customFields: [{ _id: dropdown.id, value: 'second' }] } });
await new BoardPage(page).clickCard(board.listIds[0], 'Alpha Card');
const cardPage = new CardPage(page);
await cardPage.waitForOpen();
const section = cardPage.root.locator('.card-details-group-custom-fields');
await expect(section).toContainText('Second option');
const response = await request.put(`${dropdown.path}/dropdown-items/second`, {
headers: headers(user.token), data: { name: 'Renamed option' },
});
expect(response.status()).toBe(200);
await page.reload();
await new BoardPage(page).clickCard(board.listIds[0], 'Alpha Card');
await cardPage.waitForOpen();
await expect(section).toContainText('Renamed option');
await section.locator('a.js-edit-card-custom-field-value').click();
const select = section.locator('.js-card-customfield-dropdown select');
await expect(select.locator('option[value="first"]')).toHaveText('First option');
await expect(select.locator('option[value="second"]')).toHaveText('Renamed option');
await expect(select).toHaveValue('second');
expect(db.getCard(card._id).customFields).toEqual([{ _id: dropdown.id, value: 'second' }]);
});
+93
View File
@@ -0,0 +1,93 @@
'use strict';
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const vm = require('node:vm');
const { test } = require('node:test');
const route = '/api/boards/:boardId/custom-fields/:customFieldId/dropdown-items/:dropdownItemId';
const plain = value => JSON.parse(JSON.stringify(value));
function fixture({ deny = false, fail = false, stale = false } = {}) {
const calls = [];
const document = { _id: 'field', boardIds: ['board'], settings: {
dropdownItems: [{ _id: 'first', name: 'First' }, { _id: 'second', name: 'Second' }],
} };
let handler;
const context = {
WebApp: { handlers: Object.fromEntries(['get', 'post', 'put', 'delete'].map(verb => [verb, (url, fn) => {
if (verb === 'put' && url === route) handler = fn;
}])) },
Authentication: { async checkBoardWriteAccess(userId, boardId) {
calls.push(['access', userId, boardId]);
if (deny) throw new Error('Forbidden');
} },
ReactiveCache: { async getCustomField(selector) {
calls.push(['read', plain(selector)]);
if (selector._id !== document._id || !selector.boardIds.$in.some(id => document.boardIds.includes(id))) return null;
return plain(document);
} },
CustomFields: { direct: { async updateAsync(selector, modifier) {
calls.push(['update', plain(selector), plain(modifier)]);
if (fail) throw new Error('Update failed');
// A concurrent removal/reorder no longer matches the captured index.
if (stale) return 0;
return 1;
} } },
sendJsonResult(res, result) { res.responses.push(plain(result)); },
};
const source = fs.readFileSync(path.join(__dirname, '../server/models/customFields.js'), 'utf8');
vm.runInNewContext(source.slice(source.indexOf('WebApp.handlers.get(')), context);
assert.equal(typeof handler, 'function');
return {
calls, document,
async rename(params = {}, body = { name: 'Renamed' }, res = { responses: [] }) {
await handler({ userId: 'member', params: { boardId: 'board', customFieldId: 'field', dropdownItemId: 'second', ...params }, body }, res);
assert.equal(res.responses.length, 1);
return res.responses[0];
},
};
}
test('rename uses an explicit index and changes only the name, guarded by the option ID at that index', async () => {
for (const [index, id] of ['first', 'second'].entries()) {
for (const name of ['Renamed', 'Renamed again']) {
const f = fixture();
assert.deepEqual(await f.rename({ dropdownItemId: id }, { name }), { code: 200, data: { _id: id } });
assert.deepEqual(f.calls.at(-1), ['update', {
_id: 'field', boardIds: { $in: ['board'] }, [`settings.dropdownItems.${index}._id`]: id,
}, { $set: { [`settings.dropdownItems.${index}.name`]: name } }]);
assert.equal(f.calls[0][0], 'access');
}
}
});
for (const params of [{ dropdownItemId: 'missing' }, { customFieldId: 'missing' }, { boardId: 'other' }]) {
test(`unmatched dropdown rename returns 404 without writing: ${JSON.stringify(params)}`, async () => {
const f = fixture();
assert.deepEqual(await f.rename(params), { code: 404, data: { error: 'Dropdown item not found' } });
assert.ok(!f.calls.some(call => call[0] === 'update'));
});
}
test('a concurrent removal or reorder returns 404 instead of acknowledging an unmatched update', async () => {
const f = fixture({ stale: true });
assert.deepEqual(await f.rename(), { code: 404, data: { error: 'Dropdown item not found' } });
});
test('omitting the name retains the existing no-op response without writing', async () => {
const f = fixture();
assert.deepEqual(await f.rename({}, {}), { code: 200, data: { _id: 'second' } });
assert.ok(!f.calls.some(call => call[0] === 'update'));
});
test('authorization runs before reading and database failures never send success', async () => {
for (const options of [{ deny: true }, { fail: true }]) {
const f = fixture(options);
const res = { responses: [] };
await assert.rejects(f.rename({}, undefined, res), options.deny ? /Forbidden/ : /Update failed/);
assert.deepEqual(res.responses, []);
if (options.deny) assert.deepEqual(f.calls, [['access', 'member', 'board']]);
}
});
+6 -2
View File
@@ -42,8 +42,12 @@ check('#1 setAvatarUrl validates the URL scheme at write time', () => {
assert.ok(/assertSafeAvatarUrl\(avatarUrl\)/.test(setter), 'setAvatarUrl must validate');
const adminSetter = src.slice(src.indexOf('async adminSetAvatarUrl('));
assert.ok(/assertSafeAvatarUrl\(avatarUrl\)/.test(adminSetter), 'adminSetAvatarUrl must validate');
// the validator must reject a javascript: scheme (only http/https/data:image/local allowed)
assert.ok(/scheme === 'http' \|\| scheme === 'https'/.test(src));
// the validator must reject a javascript: scheme (only http/https/data:image/local allowed).
// The rule moved to models/lib/avatarUrlScheme.js so the Users deny rule can
// apply it to a direct client write too (tests/avatarUrlDirectWrite.test.cjs).
assert.ok(/require\('\/models\/lib\/avatarUrlScheme'\)/.test(src), 'assertSafeAvatarUrl uses the shared rule');
assert.ok(/scheme === 'http' \|\| scheme === 'https'/.test(read('models/lib/avatarUrlScheme.js')));
assert.equal(require('../models/lib/avatarUrlScheme').isStorableAvatarUrl('javascript:alert(1)'), false);
});
// ── #2 Trello import source URL stored XSS — SourceBleed ────────────────────
+4 -1
View File
@@ -34,7 +34,10 @@ console.log(' ok - the first swimlane\'s headers stay at the top');
// Negative: the one rule is scoped to the setting, so a board without it is
// drawn exactly as before, and no second sticky mechanism exists.
const rules = css.slice(css.indexOf('/* #2805: one shared'));
assert.match(rules, /\*\/\n\.board-canvas\.shared-list-headers \.js-swimlane:not\(\.is-first-swimlane\) \.list-header \{\s*display: none;\s*\}\s*$/);
// `!important` on purpose (#6902): a plain `display: none` lost to the desktop
// list header's `display: block !important`, so every swimlane kept its
// headers. tests/sharedListRow6902.test.cjs pins why it must win.
assert.match(rules, /\*\/\n\.board-canvas\.shared-list-headers \.js-swimlane:not\(\.is-first-swimlane\) \.list-header \{\s*display: none !important;\s*\}\s*$/);
assert.doesNotMatch(rules, /position: sticky/);
console.log(' ok - only boards with the setting change');
console.log('\nsharedListHeaders: all tests passed');
+42
View File
@@ -111,3 +111,45 @@ test('the Swimlanes view uses it: lists, empty state, opened list, list drop and
assert.match(read('client/components/lists/listBody.jade'), /each \(cardsWithLimit \(idOrNull containerSwimlaneId\)\)/);
assert.match(read('models/lists.js'), /return cardSwimlaneId === swimlaneId;/);
});
// The setting's whole point is ONE header row, and a plain `display: none` lost
// to the desktop list header layout's `display: block !important`, so every
// swimlane kept its headers. Every !important display rule on a .list-header
// anywhere in the client CSS must be outranked by the hiding rule.
test('the other swimlanes\' list headers stay hidden: the hiding rule outranks every !important header display', () => {
const fs = require('node:fs');
const path = require('node:path');
const root = path.join(__dirname, '..');
const css = [];
const walk = dir => {
for (const e of fs.readdirSync(path.join(root, dir), { withFileTypes: true })) {
const rel = path.join(dir, e.name);
if (e.isDirectory() && !e.name.startsWith('_build') && e.name !== 'node_modules') walk(rel);
else if (e.name.endsWith('.css')) css.push([rel, fs.readFileSync(path.join(root, rel), 'utf8')]);
}
};
walk('client');
const specificity = sel => {
const s = sel.replace(/:not\(([^)]*)\)/g, ' $1');
return (s.match(/#[\w-]+/g) || []).length * 100 + (s.match(/\.[\w-]+|\[[^\]]+\]|:[\w-]+/g) || []).length * 10
+ (s.replace(/[.#][\w-]+|\[[^\]]+\]|:[\w-]+/g, ' ').match(/(^|[\s>+~])[a-z][\w-]*/gi) || []).length;
};
const HIDE = '.board-canvas.shared-list-headers .js-swimlane:not(.is-first-swimlane) .list-header';
let hide = null;
const rivals = [];
for (const [file, src] of css) {
for (const m of src.replace(/\/\*[\s\S]*?\*\//g, '').matchAll(/([^{}]+)\{([^{}]*)\}/g)) {
const body = m[2];
for (const sel of m[1].split(',').map(x => x.trim())) {
if (sel === HIDE) hide = body;
else if (/\.list-header$/.test(sel) && /display\s*:[^;]*!important/.test(body)) rivals.push([file, sel]);
}
}
}
assert.ok(hide, 'the hiding rule exists');
assert.match(hide, /display\s*:\s*none\s*!important/, 'it must be !important to beat them');
assert.ok(rivals.length >= 1, 'the scan finds the !important header display rules');
for (const [file, sel] of rivals) {
assert.ok(specificity(HIDE) > specificity(sel), `${file}: "${sel}" (${specificity(sel)}) must not outrank ${specificity(HIDE)}`);
}
});
+90
View File
@@ -0,0 +1,90 @@
'use strict';
// docs/Security/Sandboxes/vscodium/vscodium-sandbox.sh closes the VSCodium
// Flatpak to this checkout, with ONE deliberate exception:
// --talk-name=org.freedesktop.Flatpak, so `flatpak-spawn --host docker ...`
// reaches the host's Docker and build.sh can run Playwright Firefox and WebKit
// in the Playwright image when they cannot start inside the sandbox.
// WEKAN_SANDBOX_HOST_DOCKER=0 must close that again. This runs the script with
// a stub `flatpak` in PATH and checks the arguments it would have passed.
// Run: node tests/vscodiumSandboxHostDocker.test.cjs
const assert = require('assert');
const fs = require('fs');
const path = require('path');
const { spawnSync } = require('child_process');
const root = path.join(__dirname, '..');
const scriptPath = path.join(root, 'docs/Security/Sandboxes/vscodium/vscodium-sandbox.sh');
const readme = fs.readFileSync(path.join(root, 'docs/Security/Sandboxes/vscodium/README.md'), 'utf8');
const buildSh = fs.readFileSync(path.join(root, 'build.sh'), 'utf8');
let passed = 0;
const test = (name, fn) => { const r = fn(); if (r === 'skip') { console.log(' skip -', name); return; } passed += 1; console.log(' ok -', name); };
const tmpBase = path.join(root, '.tools', 'tmp');
fs.mkdirSync(tmpBase, { recursive: true });
const tmp = fs.mkdtempSync(path.join(tmpBase, 'vscodium-sandbox-test-'));
const stubDir = path.join(tmp, 'bin');
fs.mkdirSync(stubDir);
const logFile = path.join(tmp, 'flatpak.log');
// One line per `flatpak` call, its arguments separated by tabs.
fs.writeFileSync(path.join(stubDir, 'flatpak'),
'#!/bin/sh\n(IFS="\t"; printf "%s\\n" "$*") >> "$FLATPAK_LOG"\n', { mode: 0o755 });
function overrideArgs(env) {
fs.rmSync(logFile, { force: true });
const r = spawnSync('bash', [scriptPath], {
env: { ...process.env, ...env, PATH: `${stubDir}:${process.env.PATH}`, FLATPAK_LOG: logFile },
encoding: 'utf8',
});
assert.strictEqual(r.status, 0, r.stderr);
const calls = fs.readFileSync(logFile, 'utf8').trim().split('\n').map((l) => l.split('\t'));
const override = calls.find((c) => c[0] === 'override' && c.includes('--nofilesystem=home'));
assert.ok(override, 'the closing `flatpak override` was called');
return override;
}
try {
test('the script is bash (it uses an array) and parses', () => {
assert.match(fs.readFileSync(scriptPath, 'utf8'), /^#!\/usr\/bin\/env bash\n/);
assert.strictEqual(spawnSync('bash', ['-n', scriptPath]).status, 0);
});
test('by default the host Docker route is granted', () => {
const args = overrideArgs({ WEKAN_SANDBOX_HOST_DOCKER: '' });
assert.ok(args.includes('--talk-name=org.freedesktop.Flatpak'), args.join(' '));
assert.ok(!args.includes('--no-talk-name=org.freedesktop.Flatpak'));
});
test('negative: WEKAN_SANDBOX_HOST_DOCKER=0 refuses it', () => {
const args = overrideArgs({ WEKAN_SANDBOX_HOST_DOCKER: '0' });
assert.ok(args.includes('--no-talk-name=org.freedesktop.Flatpak'), args.join(' '));
assert.ok(!args.includes('--talk-name=org.freedesktop.Flatpak'));
});
test('negative: the grant opens nothing else - home, host and the SSH agent stay closed', () => {
for (const env of [{ WEKAN_SANDBOX_HOST_DOCKER: '' }, { WEKAN_SANDBOX_HOST_DOCKER: '0' }]) {
const args = overrideArgs(env);
for (const closed of ['--nofilesystem=home', '--nofilesystem=host', '--nosocket=ssh-auth']) {
assert.ok(args.includes(closed), `${closed} missing`);
}
assert.ok(!args.some((a) => /docker\.sock/.test(a)), 'no Docker socket is mounted');
assert.ok(!args.some((a) => /^--filesystem=(home|host|~\/?$)/.test(a)), 'no home/host filesystem');
}
});
test('build.sh reaches Docker through flatpak-spawn --host docker, not a general host shell', () => {
assert.match(buildSh, /flatpak-spawn --host docker "\$@"/);
});
test('the README documents the grant, its cost and the opt-out', () => {
assert.match(readme, /--talk-name=org\.freedesktop\.Flatpak/);
assert.match(readme, /root-equivalent/);
assert.match(readme, /WEKAN_SANDBOX_HOST_DOCKER=0/);
assert.ok(!/Docker is NOT available inside this Flatpak sandbox/.test(readme), 'stale claim removed');
});
} finally {
fs.rmSync(tmp, { recursive: true, force: true });
}
console.log(`vscodiumSandboxHostDocker: ${passed} passed`);