Apply the instance visibility policy at the shared before-insert hook so copies, imports and lazy helpers cannot create public boards. Keep policy enforcement independent of security logger availability.
Thanks to xet7 !
Remove unvalidated deposit and null board IDs from source-card scope. Publish deposit content beneath its own reactive visibility-filtered board cursor, applying destination assignment restrictions and reactive card children. Filter status counts by visible assigned scopes.
Require destination write access before pointer changes and subtask landing structures, and deny client pointer rename bypasses. Summarize blocked writes in Problems. Positive decisions, scope/dispatcher inventory and existing subtask/status suites pass; browser regression syntax-check passes with live execution pending.
Thanks to Wenhao Wu, Southeast University and xet7 !
Require source write access for authoritative and DDP link creation, including pointer changes. Treat explicit non-writing source roles as a ceiling on delegated writes, covering legacy self-created links. Match UI permissions and remove the link action from the non-writer menu. Record denied writes in bounded Problems summaries.
Actual shared permission decisions for every role, creation/deny inventory and existing link and role suites pass. Browser regression syntax-check passes; live execution pending.
Thanks to Wenhao Wu, Southeast University and xet7 !
Domain-approved inviters must hold an allowed inviter role on each requested board. Site admins retain access to real boards; missing boards fail closed. Validate the complete grant before creating or changing any invitation code or sending mail, and summarize rejected grants in Problems.
Role and grant inventory plus invitation email suites pass. Browser regression syntax-check passes; live execution pending.
Thanks to Wenhao Wu, Southeast University and xet7 !
Reject invitation field writes, array mutations, parent replacement and rename destinations. Inspect actual modifier paths so top-level profile field reporting does not block ordinary preference updates. Record denied invitation changes through bounded Problems summaries.
Profile guard and existing invitation suites pass. Browser regression syntax-check passes; live execution pending.
Thanks to Wenhao Wu, Southeast University and xet7 !
Check write capability and authoritative card board before button dispatch and again in the shared action dispatcher. Board buttons without a card remain supported. Record denied contexts in bounded Problems summaries.
Role and boundary decisions plus dispatcher inventory and existing rule suites pass. Browser regression syntax-check passes; live execution pending.
Thanks to Wenhao Wu, Southeast University and xet7 !
Align board title, card settings and all rule mutations with existing DDP administrator policy. Preserve site-admin access and record refused management attempts in bounded Problems summaries.
Actual guard and endpoint inventory tests pass along with card-settings and rule suites. Browser regression syntax-check passes; live execution pending.
Thanks to Wenhao Wu, Southeast University and xet7 !
Reject foreign-card REST and DDP comment inserts and prevent DDP rebinding from bypassing the boundary. Keep card-authoritative legacy comment listing. Add bounded Problems summaries and attack, negative insert inventory and browser regression coverage.
Targeted Node suites pass; browser regression is syntax-checked with live execution pending.
Thanks to Wenhao Wu, Southeast University and xet7 !
Enforce the canonical role policy for both sides of list, swimlane and checklist moves, scoped imports, attachment renames and history writes. Record denied attempts through bounded Problems summaries without allowing logging failures to bypass authorization.
Add role-matrix decisions, the reported moveList attack, sibling guard inventory and a browser regression. Targeted Node suites pass; live browser execution remains pending.
Thanks to Wenhao Wu, Southeast University and xet7 !
Apply instance visibility policy to direct board creation and card-to-board conversion. Record blocked public overrides with bounded Problems summaries, preserving enforcement if logging fails. Positive policy and negative insert-inventory suites pass; browser regression is syntax-checked but live execution remains pending.
Thanks to Wenhao Wu, Southeast University and xet7 !
Apply membership-only scope to search selectors and pagination while retaining public discovery for other callers. Add regression coverage for shared access and public boards.
Thanks to xet7 !
The early universal file handler returned 404 for CollectionFS avatars before the legacy fallback handler could run, including versioned Meteor-Files URLs. Read legacy avatar metadata and streams only after authenticating the request, retain safe response headers, close conditional-request streams and preserve missing-file responses. Add positive and negative runtime coverage and a browser image regression.
Thanks to xet7 !
Remove the undeclared body-parser import while preserving JSON and URL-encoded parsing, the 50MB limit and simple form decoding. Exercise real HTTP requests, malformed and oversized JSON, compression and Rspack compilation. Permit the canonical Meteor prerelease in the website manifest regression while rejecting stale Docker metadata.
Thanks to xet7 !
Meteor merges top-level profile objects by publication precedence. Publish the private boardViewPreference field reactively so a narrow or empty profile cannot hide it during impersonation. Preserve pending choices until the private preference catches up, and route the remaining calendar helper through the same resolver. Cover preference precedence, updates, unsets, deletion, observer cleanup and the real impersonation browser path.
Thanks to gleneindre and xet7 !
Fixes#6691,
Finish setUserId before returning to the client, so subscription recreation cannot race the client identity change. Add a deferred-promise regression and verify switch failures propagate.
Thanks to gleneindre and xet7 !
Fixes#6691,
Resolve missing or invalid profile board views through the browser preference and Swimlanes default without reloading. Publish the authenticated user board-view preference privately, including after impersonation. Add fallback, selector-scope, publication-isolation and browser regressions.
Thanks to gleneindre and xet7 !
Fixes#6691,
Apply the selected calendar to shared date displays, calendar month views and date inputs. Provide mouse and keyboard date navigation and hour/minute selection while preserving native date storage. Document the supported offline calendars and add display, picker and browser regressions.
Thanks to mimZD and xet7 !
Use a Node-compatible HTML sanitizer so both attachment modes complete instead of throwing at the first HTML-bearing card. Abort partial HTTP transfers on failure and cover complete JSON, attachment bytes and browser downloads.
Thanks to xet7 !
A reported test environment (mongo:8.2.2 in Kubernetes) filled its data
volume: the checkpoint's fdatasync returned ENOSPC, WiredTiger panicked and
mongod aborted - and then it kept failing on every start, with the disk long
since freed. MongoDB 8.2 keeps a throwaway WiredTiger instance under
<dbPath>/_tmp/spilldb for queries that spill to disk and empties it itself on
each start; after the abort that emptying failed ("Failed to clear dbpath of
the internal WiredTiger instance: Directory not empty"), mongod opened the
half-emptied directory, found no version file, reported "Failed to open the
spill WiredTiger instance ... database corruption detected" and fasserted.
Nothing retries, so the pod restarts forever. The data itself is intact;
deleting that one directory is the whole fix.
- snap-src/bin/mongodb-control deletes _tmp/spilldb before every mongod
start (no mongod is running at that point, and mongod recreates it), and
its start-failure handler recognises the log line and names the directory.
The snap ships MongoDB 7 today, so this is a no-op until it does not.
- Admin Panel / Problems: the db.restart row now says what a "No space left
on device" abort means for a full disk as well as for a network
filesystem, and both it and db.disk-space name the exact spill directory
to delete when MongoDB 8.2 will not start afterwards. The probe looks the
data directory up once and passes it to both rows.
- docs/Databases/MongoDB/Storage-Requirements.md gets the log signature of
both stages, why the second one never ends, the one command, what must
not be touched, and that Docker/Kubernetes users run it themselves since
the database container is MongoDB's own image.
- tests/databaseHealth.test.cjs pins the spill path, both rows' advice, the
probe wiring, the snap's pre-start deletion (before the first start, after
the running-instance check, and the only recursive delete apart from the
existing FerretDB reset) and the documentation.
Thanks to xet7 !
GET /api/boards/:boardId/boardViewSettings answers which entries of the
Board View menu a board offers, which one it opens in, separately for a
public and a private board, and the menu order - in the normalised shape the
menu renders with: every view once with both showOnPublic and showOnPrivate
explicit, the two defaults resolved (missing or unknown reads as Swimlanes),
boardViewOrder made whole, and `keys` listing the known views. Board access.
PUT /api/boards/:boardId/boardViewSettings takes any subset of
boardViewSettings, defaultPublicBoardView, defaultPrivateBoardView and
boardViewOrder, through the same pure modifiers the popup's clicks apply
(showBoardViewModifier, defaultBoardViewModifier, normalizeBoardViewOrder),
now composed by boardViewSettingsRequest() in models/lib/boardViewSettings.js:
a default is always shown on its side, hiding a side's current default is a
400 (set another default first - or in the same request, since defaults are
applied before the show flags), an unknown view key anywhere in the body is a
400 and nothing of that request is written, and the order is normalised so the
menu lists every view exactly once. Board admin (or site admin), the same
check as cardFieldOrder. Both answer boardViewSettingsSnapshot().
The existing GET/PUT /api/boards/:boardId/cardSettings routes get the JSDoc
@operation blocks the OpenAPI generator reads (get_board_card_settings,
update_board_card_settings), so the hand-written copy in
openapi/extra_paths.yml - which now duplicated the operationId - is removed.
public/api/wekan.yml and wekan.html are regenerated with the release
workflow's own commands: 158 operations. docs/API/REST-API.md documents both
endpoints with curl examples, and docs/Features/Board/Board-View-Settings.md
links to them.
tests/restApiNewFeatureRoutes.test.cjs pins the four routes to their method,
path, @operation and auth check, that the PUT writes only the helper's $set,
the snapshot's shape, the request helper's positive cases (setting a default
shows it, one request may move the default and hide the old one, the order is
normalised, the input board is not mutated) and negatives (unknown view key in
the order, the settings or a default; hiding a side's default; malformed
bodies; a partly-invalid body applies nothing), and that the generated and the
committed spec carry the four operations exactly once with the old
edit_board_card_settings gone.
Thanks to xet7 !
Every feature of the recent releases that had a UI but no endpoint, on the
same server-side code the UI uses:
- DELETE /api/boards/:boardId/attachments/:attachmentId soft-deletes,
POST .../attachments/:attachmentId/restore restores, and
GET /api/boards/:boardId/attachments/deleted lists what is restorable -
all through the attachments.softDelete / attachments.restore methods the
card and the card history use, run as the request's user. No hard delete.
- GET /api/admin/problems (the Problems status overview plus the new-problem
count per stream), GET /api/admin/problems/:stream (one page, with
limit/skip/search) and POST /api/admin/problems/:stream/acknowledge,
through the admin-only eventLog* methods the Admin Panel pages call.
- GET /api/admin/oauth-providers, PUT /api/admin/oauth-providers/:providerKey
and PUT /api/admin/passwordless, through saveOauthProviderSettings,
savePasswordlessSettings and getOauthProviderConfigSources. A provider's
secret is reported only as { source, hasValue }, never its value.
- GET/PUT /api/boards/:boardId/cardFieldOrder, normalised with the same
applyCardFieldOrder() the card renders with.
- PUT /api/boards/:boardId/rules/:ruleId accepts `enabled` to pause and
resume a rule, and GET reports it.
The OpenAPI generator is fixed on the way: server/models/boards.js has had a
bare `catch {` since v11.67, the esprima parser cannot read that, and a parse
failure was silently skipped - so public/api/wekan.yml has shipped WITHOUT
the whole Boards API since then. It now downlevels `catch {` and
`for await (`, warns when a file cannot be parsed, and no longer emits an
empty sub-schema for a primitive array-element marker such as
`wipLimitGroups.$.listIds.$`, which made the spec unparseable YAML.
public/api/wekan.yml and wekan.html are regenerated with the release
workflow's own commands: 156 operations, up from 122.
tests/restApiNewFeatureRoutes.test.cjs pins every new route to its method,
path, @operation block and authentication check, that the OAuth endpoints
never mention a secret outside the input whitelist, the generator's two
fixes, that the generated and the committed spec carry the Boards API and the
new operations, and - as the negative sweep - that no route in models/ or
server/models/ lacks an authentication check.
Thanks to xet7 !
Flowtime, Pomodoro, Stickers and Location shipped without an allows* board
toggle, so they rendered on every card and Card Settings had no way to hide
them. Dependencies, Vote, Planning Poker, Text Notes and the activity history
on the opened card had the same gap, as did the dependencies, stickers,
comment-count, vote and poker badges on the minicard.
Each now has a Boards field (default true, so an existing board keeps showing
what it showed), a setter, a REST card-setting key, a healed true-default in
the schema upgrade, a row in Board Settings / Card with its click handler,
and a gate in cardDetails.jade / minicard.jade. allowsActivities already
existed but gated nothing and its row was commented out; it is wired now.
The rows of the popup are in the order the fields appear on the opened card
(Mark complete, number, cover; then the reorderable sections through the
same orderedCardFieldSections source the card renders from, so a board's own
order applies to both; then checklists ... comments, activities), with the
minicard-only rows beside the card row they belong with. No new i18n keys:
every row reuses the field's existing name.
tests/cardSettingsCoverage.test.cjs derives the card's order from the
template and pins the popup to it, checks every gate has a row and every new
row is read, and that none of the four sections is unconditional.
Thanks to rmb82 and xet7 !
Fixes#6688.
Delete on an attachment used to remove the document and its file at once.
It is now the 'attachments.softDelete' method (History.md section 12): the
document gets deletedAt/deletedBy/deleteBatchId with the same helpers lists
use, the file is kept, and the card's cover is unset if this was it. Every
card-facing read - the opened card's gallery and "Attachments (N)" count,
the minicard paperclip badge, the slideshow, the cover, the board-background
picker, My Attachments, the API list endpoints and the exporters - filters
to live attachments with liveAttachments(); the publications keep sending
the deleted ones so the card history can reach them.
The card history records who deleted it and when, with the filename in the
row. Restore - the table's selection + Restore, or the row's own Restore
button, both through changeHistory.restore and applyAttachmentContent -
clears the mark, so the card, its count and the minicard badge include the
attachment again; the cover is never re-set. An attachment row previews
with the existing attachmentViewer slideshow and downloads with the same
link the gallery draws, and never offers cover or background. Uploads and
renames are recorded through the existing history hooks.
There is no per-attachment hard delete any more: api.attachment.delete,
DELETE /api/attachment/delete/:id and removeBoardBackground soft-delete,
permanentlyDeleteAttachmentFromFilesReport and the Files report's delete
button are gone, Attachments.allow remove and onBeforeRemove refuse every
client remove and log the attempt under Admin Panel / Problems. The one
hard delete is Admin Panel / Problems / Delete enabled, board archived,
board deleted from the archive: boardRemover now removes every attachment
of the board, live and soft-deleted, with its file.
One new i18n key, attachment-soft-delete-pop, replaces the "permanent, no
undo" confirmation text; it is inserted in English into every locale at
the same position for translation.
Thanks to xet7 !
Meteor's own accounts packages - accounts-google, accounts-github,
accounts-facebook, accounts-twitter, accounts-meteor-developer,
accounts-weibo, accounts-meetup and accounts-passwordless - are added, so
every way to log in that Meteor's accounts system offers is available.
models/lib/oauthProviders.js is the pure catalog of the seven providers
(env var names, ServiceConfiguration id field, login method, icon, label
key) with the decisions built on it: OAUTH_<PROVIDER>_ENABLED plus id and
secret (each also read from a <NAME>_FILE Docker secret), the Admin Panel
override winning over the env var, OAUTH_PROVIDERS_LOGIN_STYLE,
OAUTH_PROVIDERS_MERGE_EXISTING_USERS and PASSWORDLESS_ENABLED.
server/lib/oauthProviders.js writes ServiceConfiguration for every enabled
provider at startup and on demand (reconfigureOauthProviders, called by the
Admin Panel after a save) and removes it for a disabled one, so switching a
provider off takes effect without a restart. A first login through a
provider becomes a WeKan user the way OIDC does, fail-closed: an existing
account of another login method is only linked when merging is on and the
provider verified the address, otherwise the login is refused and the
attempt recorded on the new oauth.account-conflict canary for Admin Panel
-> Problems. Passwordless is gated on both the token-request method and
the login attempt while it is off.
getAuthenticationsEnabled reports each enabled provider key and
passwordless, and the login form shows one button per provider and a
two-step e-mailed-code form under the SAML button, with errors in the same
region as the password form. No credential ever reaches the client.
tests/oauthProviders.test.cjs covers the catalog, the env/_FILE/admin
resolution, the enabled and takeover decisions, the ServiceConfiguration
upsert/remove, the canary, the login form and the no-secret-on-the-client
negative checks.
Thanks to xet7 !
Admin Panel / People / Login gets a section for Meteor's own accounts-*
login services (Google, GitHub, Facebook, X/Twitter, Meteor Developer, Weibo,
Meetup) and for passwordless login, built the same way as the LDAP section:
every OAUTH_<PROVIDER>_ENABLED / _CLIENT_ID / _SECRET env var, the shared
OAUTH_PROVIDERS_LOGIN_STYLE and OAUTH_PROVIDERS_MERGE_EXISTING_USERS, and
PASSWORDLESS_ENABLED can be set there, a value set in the Admin Panel wins
over the env var, and a badge beside each field names the source in effect.
The secret is stored in Settings.oauthProviders.<key>.secret and, like the
LDAP bind password, is never published: only the boolean secretSet is, an
empty secret submission leaves the stored one untouched, and the sources
method reports it through hasConfigValue() only. saveOauthProviderSettings
validates the provider key against the catalog and both save methods call
reconfigureOauthProviders() so a change takes effect without a restart.
Tests: tests/oauthProvidersAdminOverride.test.cjs, and the whole-tree secret
sweep in tests/ldapAdminOverrideSecurity.test.cjs now also matches
hyphenated sub-document keys.
Thanks to xet7 !
server/models/collectionBootstrap.js already owned this collection's index
(the unique cardCommentId one); 03ffb56a5 added a second module for the
same collection. One place per collection: the cardId and boardId indexes
now sit beside the existing one there, and the separate module is gone.
tests/cardCommentReactionsIndexes.test.cjs pins that arrangement.
Thanks to xet7 !
The reported crash series (.tools/crash) was invisible from inside WeKan:
MongoDB aborting on every checkpoint, restarting, aborting again, with
every query in between slow - and the admin found it in the container log.
Admin Panel / Problems / Database problems now gets a row for each thing
WeKan can measure from its side of the socket, from a probe that runs 30 s
after startup and every five minutes (server/lib/databaseHealth.js, the
pure decisions in models/lib/databaseHealth.js):
- db.restart: serverStatus.uptime went down while WeKan kept running - the
database process restarted; points at the fatal-assertion/fsync cause and
the storage page.
- db.network-filesystem: getCmdLineOpts' dbPath, when it is a directory
this process can see (snap, embedded database, shared volume), is on a
CIFS/SMB, NFS or FUSE filesystem (fs.statfs f_type).
- db.slow-storage: serverStatus.opLatencies reads averaged over 100 ms
across the interval, on a real number of reads - the storage latency
behind the "Slow query" lines.
- db.disk-space: dbStats fsUsedSize/fsTotalSize below 5% or 512 MiB free -
the real "no space left on device", before it happens.
- db.index-created: the one remediation WeKan can do itself. ensureIndex
(server/lib/mongoStartup.js) now reports an index it created on a
collection that already held documents - until then every query on it
was a collection scan - as found and fixed; a new, empty collection
getting its indexes at first start stays silent.
All rows go through the existing `database` stream (recordDatabaseHealth in
server/lib/databaseProblems.js: same shape, same per-minute quieting per
type), so they land on the same page as what the database itself says.
FerretDB answers only some of these commands; each step is independent and
what it cannot answer is skipped. Nothing here can throw into startup or
sits on a request path.
tests/databaseHealth.test.cjs drives every decision (including the
reported case: 519 MB used, 10 GiB free is NOT a space problem) and pins
the wiring.
Thanks to xet7 !
From a reported MongoDB crash series (.tools/crash: WeKan and MongoDB in one
Kubernetes pod, the database volume on an SMB/DFS share):
- The crash itself is WiredTiger's checkpoint fsync() returning ENOSPC
("No space left on device" with 519 MB used and 10 GiB free) on the
network share, followed by a fatal assertion and abort - every checkpoint,
so a restart loop. That is the storage, not WeKan: MongoDB requires a
local filesystem with real fsync semantics under its data directory.
docs/Databases/MongoDB/Storage-Requirements.md now says so, shows what
the log looks like when it is not, and what to do (local block volume;
attachments may still live on a share; MONGO_URL over TCP is fine).
- The WeKan-side finding in the same logs: card_comment_reactions had no
index at all, and every board open queried it by `cardId: { $in: [...] }`
and by `boardId` as a full collection scan - 3,397 COLLSCANs of that one
collection in the last crash log, up to 1.6 s each, the bulk of its
"Slow query" lines. server/models/cardCommentReactions.js now ensures
indexes on cardId, boardId and cardCommentId at startup, like every other
per-card collection.
tests/cardCommentReactionsIndexes.test.cjs pins both.
Thanks to xet7 !
The user's own ./build.sh run reproduced it directly: "Error: Cannot find
module '/models/settings'" thrown from packages/wekan-ldap/server/ldap.js
the moment the compiled server actually started (rspack's own build only
warns about this - node test suites never catch it either, since they run
these files with plain Node, outside Meteor's package linker). A local
package under packages/ is its own isolated build unit and cannot import
an app-tree module by absolute path ('/models/...', '/server/...'), static
or dynamic, import or require - that only resolves by accident, if at all.
Four packages had this shape:
- packages/wekan-ldap/server/ldap.js imported Settings and resolveConfigValue
from /models/settings and /models/lib/configResolver directly (added by the
recent LDAP Admin Panel override feature). configResolver's pure functions
are now vendored into packages/wekan-ldap/server/configResolver.js; Settings
access is injected instead, via setLdapSettingsAccessor(), wired once at
boot by the new server/ldapAdminSettingsBridge.js (imported from
server/imports.js).
- packages/wekan-oidc/oidc_server.js required /models/lib/oauth2ClientSecretJwt
(pure, Node crypto/fs only) - vendored the same way, into
packages/wekan-oidc/oauth2ClientSecretJwt.js.
- packages/wekan-accounts-saml/saml_server.js and
packages/wekan-accounts-cas/cas_server.js each lazily required
/server/lib/canary inside their account-conflict guard's try/catch, so it
failed silently (caught, not crashing boot) rather than ever actually
logging the attempt. canary.js is stateful (Meteor/Mongo-backed rate
limiting), so it can't be vendored the same way; server/lib/canary.js now
sets global.__wekanTripCanary once at module load (the Node process itself
is the one thing both sides can reach without either importing the other),
and both packages call through that instead.
Also found while wiring this up: packages/wekan-accounts-saml/saml_server.js
imports the npm package body-parser without declaring it in package.js's
Npm.depends, which crashed boot the same way once it stopped finding the
copy some unrelated app dependency happened to hoist into node_modules.
Added it to Npm.depends.
Tests: tests/packageAppImportBoundary.test.cjs sweeps every file under
packages/ for an app-tree absolute import (the negative check - nothing
under packages/ may do this, anywhere) and pins both vendored copies'
behavior against their app-tree originals so they cannot silently drift.
tests/securityAdvisories20260825.test.cjs's CAS account-conflict assertion
updated to match the new global.__wekanTripCanary bridge call.
Verified end to end: bootstrapped Meteor 3.5.2 in-sandbox and ran the real
dev server (`meteor run`) before and after - it reproduced both the
Settings/configResolver crash and, after fixing that, the body-parser
crash, exactly as reported; after this commit it compiles and starts
cleanly with neither.
Thanks to xet7 !
Board Settings description publication, Notification Settings wiring and
two unscaled font sizes.
- allowsSpentTime/allowsSpentTimeOnMinicard have defaultValue: true in
models/boards.js but were missing from schemaUpgradeSteps.js's
BOARD_ALLOWS_TRUE_DEFAULTS, so a board created before those flags existed
would read them as undefined/false and hide its spent-time badge.
- customPrivateBoardDesc/customPublicBoardDesc are read by settingBody.jade
but were not in server/publications/settings.js's SETTING_FIELDS, so the
fields always rendered empty and saving them looked like it did nothing.
- notificationSettingsPopup.jade/.js are used by peopleBody.jade but were
never imported into client/features/settings.js, so the template compiled
to nothing and the popup did not exist at runtime.
- timelineView.css and two rules in minicard.css still used bare px
font-size values instead of calc(Npx * var(--wekan-ui-font-scale, 1)),
so the UI font-size preset did not reach them.
Thanks to xet7 !
Fix TypeError: string.toLowerCase is not a function server unhandledRejections
reported in production. The registration invitation-code check in
Users.after.insert() read doc.authenticationMethod.toLowerCase() unguarded,
but authenticationMethod is only set for oauth2/ldap signups - a normal
password/invitation signup left it undefined and crashed this hook on every
insert whenever disableRegistration was on; doc.emails[0].address was also
read unguarded. The buffered notification-email sender likewise read
user.emails[0].address.toLowerCase() unguarded, crashing when a user (e.g. a
header-auth/LDAP account) has an empty emails array. The CSV/TSV importer's
header-row mapping read headerRow[i].toLowerCase() unguarded, which could
throw on a sparse row cell that isn't a string.
A full audit of every server-reachable .toLowerCase() call site (server/,
models/, packages/) found the rest already guarded (typeof checks, ||
'' fallbacks, or values sourced from validated schema fields).
Thanks to xet7 !
A card can now be set to automatically spawn a fresh copy of itself, in the
same list, on a recurring schedule (daily/weekly/monthly) - the same idea
Kanboard has for a recurring task, applied on-premise with no external
dependency. Reuses the exact mechanism already built for a checklist's
automatic reset: a recurrenceInterval field on the card, the same
quave:synced-cron job infrastructure, and the same due-date arithmetic
pattern (models/lib/cardRecurrenceSchedule.js mirrors
models/lib/checklistResetSchedule.js). The card's "..." menu gets a new
"Card recurrence" entry, next to Save card as template, opening a popup
shaped exactly like the checklist's "Automatic reset" popup.
Thanks to xet7 !
A WeKan list can be marked with a syncSource (type/url/projectKey) and a
server-only credential (models/listSyncCredentials.js, never published).
server/listSync.js registers a quave:synced-cron job, reusing the SAME
scheduling infrastructure the checklist-auto-reset job uses, that fetches
each synced list's current items and reconciles them against WeKan
(models/lib/listSyncReconcile.js, pure/unit-tested): new items create
cards, changed items update them, and items that disappeared upstream are
ARCHIVED rather than deleted, so old entries stay in the list's history.
Fetching (server/lib/listSyncFetch.js) and parsing reuse the existing
one-time-import parsers in models/lib/externalParsers.js (parseJira is
new there; parseGithub/parseGitlab/parseGitea gained externalId) instead
of a second implementation. Jira works end to end; GitHub/GitLab/Gitea
share the same job and reconcile logic via their existing parsers.
Thanks to xet7 !
LDAP Connection button.
Every LDAP_* setting server/authentication.js and packages/wekan-ldap read
straight from process.env can now be overridden from Admin Panel / Login,
with an explicit admin value winning over the env var and the env var
winning over nothing (models/lib/configResolver.js's resolveConfigValue(),
pure and unit-tested for the precedence and for its 'admin'/'env'/'default'
source tag). The Admin Panel LDAP section shows, next to every field,
which source is currently in effect - an env var name, "Admin Panel", or
"Unset" - so it is always clear whether a value comes from the environment
or from an admin override.
The bind password never reaches the browser: it is stored in the new
Settings.ldap.bindPassword field, which server/publications/settings.js
deliberately never publishes (only the boolean ldap.bindPasswordSet is).
The password input starts empty and an empty submission leaves the
existing value/source untouched, matching the existing mail-server
password field's pattern. hasConfigValue() is the parallel, secret-safe
resolver: it returns only a boolean and a source, never the value, and a
negative test fuzzes several secret shapes through it to prove that.
Found while wiring this up: packages/wekan-ldap/server/testConnection.js's
existing ldap_test_connection method had its isAdmin check commented out
("TODO: this needs to be fixed - security issue"), so any authenticated
user - not only an admin - could trigger a real LDAP bind attempt against
the configured directory. Fixed to require isAdmin, the same check every
other admin-only Settings method uses, before any connection is attempted.
A new "Test LDAP Connection" button in Admin Panel / Login calls this
method against whichever config (admin override or env var) is currently
resolved and shows the result - success or the directory's own error -
inline, satisfying the "get back error message visible at admin panel"
request without adding a second LDAP client dependency.
Switching between LDAP, OAuth2, SAML and password login already has its
own UI (the Login pane's "Default Authentication Method" selector plus
each method's own enabled flag) and needed no separate switcher; this only
extends "enabled" itself to be admin-overridable, the same as every other
LDAP field.
Scope: LDAP is covered end to end (override + test-connection). OAuth2/
SAML/CAS's env vars are unchanged and stay env-only for now - the resolver
is written to extend to them, but doing so was out of scope for this pass.
Tests: tests/configResolver.test.cjs (precedence, source tagging,
hasConfigValue's secret non-leak, redactCredentialsInUrl for the composite-
connection-string case); tests/ldapAdminOverrideSecurity.test.cjs (the
publication never sends ldap.bindPassword, a whole-tree negative sweep for
any OTHER publication doing the same, the isAdmin gate on
ldap_test_connection runs before any connection attempt, and the method's
response never carries the password); tests/settingPublishedFields.test.cjs
extended to understand dotted/sub-document published fields so it keeps
checking the LDAP section's currentSetting.ldap.* reads against what is
actually published.
Thanks to xet7 !
A card's own description was the only place to put markdown text, so anything
beyond a single block had to be crammed into it. This adds CardTextNotes: a
small collection of named markdown notes per card, modeled on Checklists (a
denormalized boardId, the same publish/allow/deny shape, the same
GHSA-gv8h-5p3p-6hx7 cross-board-move guard).
Each note renders as a tile with its title and a markdown-rendered preview
(the `viewer` template). "Add text note" and a note's "Edit" open a popup
that reuses the description's own `editor`/`viewer` widgets verbatim - no new
markdown editor was written. "Delete" removes the note, scoped to its own
_id.
Wired into the reactive cache (getCardTextNote/getCardTextNotes, matching the
CardComments pattern), the board/linked-card/lazy-window/single-card
publications, and server/permissions/cardTextNotes.js.
tests/cardTextNotes.test.cjs pins: the model's cardId/boardId scoping, the
allow/deny permission shape, the popup's reuse of `editor`/`viewer` (positive:
+editor is used; negative: exactly one `editor` and one `viewer` template is
declared anywhere under client/components/{cards,main} - the whole tree, not
just the new files, so a competing widget cannot be introduced elsewhere
either), and that add/edit/delete are scoped calls rather than broad
selectors.
Thanks to Lapin0t and xet7 !
Closes#595,
substring check, an overly-permissive regex range and a no-op replace.
- models/lib/cardUrlAutolink.js and packages/markdown/src/
template-integration.js (kept in sync, per their own comments): the
card-title markdown-link escape only escaped ']', not the backslash
that precedes it, so a title ending in a raw backslash escaped the
']' this code inserts to close the label instead of the label
actually closing. Escape '\' before ']'.
- server/lib/documentGif.js: plainSearchText's control-character strip
used literal raw control bytes inside the regex character class
instead of \x escapes, so CodeQL flagged the range as unverifiable
(adjacent control bytes are visually indistinguishable, so a
boundary could silently shift). Rewritten with explicit \x escapes,
byte-for-byte equivalent to the original range.
- tests/notificationEmailUrlLink.test.cjs: built a dynamic RegExp by
hand-escaping only '/', leaving every other meta-character -
including backslash itself - unescaped. Added the same escapeRegExp
helper already used elsewhere in the codebase.
- tests/oauthLogoutUrl.test.cjs: asserted a returned URL did not
contain a hostname via `.includes()`, a substring check a
confusable/query-embedded hostname can fool either way. Compare the
parsed `new URL().hostname` instead.
- tests/boardCreationAdminOnly.test.cjs: `.replace(/ /g, ' ')` was a
no-op (replacing a space with itself); the actual intent was to
collapse runs of spaces, `.replace(/ +/g, ' ')`.
Every fix has a positive test proving the corrected behaviour and a
negative test reproducing the exact bypass/bug CodeQL flagged. None of
these cross a security boundary on their own (the markdown-link title
escaping is a rendering-correctness fix - DOMPurify still sanitizes
the final HTML regardless, per the existing code comments; the rest
are test-only assertion bugs), so no Admin Panel security-log entry
applies.
Thanks to GitHub CodeQL and xet7 !
Starring a board already existed (profile.starredBoards, toggleBoardStar
in models/users.js / server/models/users.js). This generalizes that same
per-user id-array shape to profile.starredSwimlanes, profile.starredLists
and profile.starredCards, each with its own toggleSwimlaneStar /
toggleListStar / toggleCardStar Meteor method that checks the id and
requires a login the same way toggleBoardStar does.
A Star/Unstar row was added to the Swimlane, List and Card hamburger menus
- a reading action, alongside Copy link and History, above the rows that
change the board. The list's own per-board `starred` field
(client/components/lists/listHeader.js isStarred()/.star(), used for the
sticky/pinned-list highlight) is untouched; the new per-user star uses its
own isListItemStarred helper and js-star-list-item row.
A new "Starred" page (/starred-items) lists everything the current user
has starred, grouped by type, reusing the "open card in place" popup
mechanism myCards/myAttachments already use for the card group. It is
reachable from the "All Pages" member menu next to My Cards / My Due
Cards / My Attachments.
The header bookmarks dropdown (starredBoardsPopup) gained three more
capped sections - Starred Swimlanes/Lists/Cards, five each, most-recently-
starred first - with a "see all" link to the uncapped Starred page. Both
the dropdown and the Starred page read the same starredItemsByType() query
(client/components/main/header.js, imported by starredItems.js), so there
is one definition of "what is starred" rather than two that could drift.
tests/starredItems.test.cjs pins the persistence shape for all three new
types, that starredCount() sums all five starred kinds, that the shared
query has exactly one definition, and that the new i18n keys are used by
all three menus. tests/starredPages.test.cjs's count assertion was updated
to match: the count now goes through the shared starredCount() aggregate
rather than two lengths added inline, still covering every starred kind.
The new labels (Star/Unstar, Starred Swimlanes/Lists/Cards, "See all
starred items", the empty-state message) are added to en.i18n.json and to
every other locale file with real per-language translations.
Thanks to chris-kwng and xet7 !
Closes#1172,
Auditing the REST API surface against #1037 found two clean CRUD gaps:
every other board sub-resource with GET/POST/DELETE already had a
matching PUT, but a checklist and a comment did not, so editing either
meant deleting and re-creating it.
PUT /api/boards/:boardId/cards/:cardId/checklists/:checklistId renames
a checklist (title only), mirroring the existing DELETE's lookup and
checkBoardWriteAccess check.
PUT /api/boards/:boardId/cards/:cardId/comments/:commentId edits a
comment's text, reusing validateCommentBody and the same
assertCanMutateComment rule (and foreign-edit canary) the DELETE
handler already applies.
tests/restApiEditGaps.test.cjs pins both routes as source-pattern
tests, the same way tests/restApiIdorBatch.test.cjs already does for
this REST surface.
Thanks to mayjs and xet7 !
#1476 asked for cycle time, lead time, throughput/velocity, bottleneck
analysis, and completion estimates based on velocity. The first four are
already covered by the existing board report charts: the Cycle Time and
Lead Time views (computeLeadCycleTime), the Throughput Histogram
(computeThroughput), and the Control Chart / Cumulative Flow Diagram / WIP
Run views, which are the standard Kanban tools for spotting a bottleneck
even though none of them is literally named "bottleneck".
The one piece that was missing is a forward-looking projection: at the
recent completion rate, when will the cards still open be done. Add
computeCompletionForecast to chartCalculations.js, reusing
computeThroughput's own weekly series rather than recomputing velocity a
second way - it averages the last 4 weeks of completions and divides the
remaining open-card count by that rate to project a date. Wire it into the
Throughput Histogram's server data (server/lib/boardChartData.js) as a
`forecast` field alongside the existing `series`, and show it as a plain-
text note under that chart (client/components/boards/charts/boardCharts.js
and .jade), with three new i18n strings for the none-remaining/no-velocity/
projected cases.
Admin Panel / People, Board Settings and Member Settings each gain a
"Notification Settings" menu entry, right below Email in Admin Panel /
People. All three open the same reusable notificationSettingsPopup
template, letting notifications (tray/in-app and email, the two services
Notifications.notify already dispatches to) be turned on or off with the
same precedence the theme override already uses: Admin Panel default,
then Board override, then the member's own override.
models/lib/notificationSettings.js is a small pure module with the
resolution function (resolveNotificationSetting) and the notification-type
catalog; server/notifications/profile.js and server/notifications/email.js
now resolve the decision before adding to the tray or buffering an email,
so a disabled service is genuinely skipped rather than only hidden in the
UI. Settings.notifyDefaultTray/Email hold the admin default,
Board.notifyOverrideTray/Email the board override, and
profile.notifyOverrideTray/Email the member override; each is optional/
nullable so "unset" always falls through to the next level.
creation it reuses.
#2209 (a 2019 follow-up to #2165's template-feature checklist) asked for
"create template from element" - creating a template directly from an
existing board/list/card, rather than only from scratch. WeKan's own
"insert a card FROM a template" flow (searchElementPopup) already existed,
but nothing did the reverse: turning an existing card INTO a template.
The card menu now offers "Save as Template" beside "Copy Card". It posts
to a new saveCardAsTemplate server method that copies the card into the
user's own "Card Templates" swimlane (creating the personal Templates
board on first use, exactly as the existing default-board-template flow
already does), marking the copy type: 'template-card' so it behaves as a
template rather than an ordinary card.
The lazy per-user Templates board creation used to live only inline in
the ensureTemplatesBoard Meteor method; it is now exported as
ensureTemplatesBoardForUserId (server/models/users.js) so this new method
can call it directly server-side instead of duplicating the board/
swimlane setup.
#2209's other two sub-items were checked and are already handled:
"cards don't appear in swimlanes if the general swimlane is deleted"
(#1959) already has thorough startup-rescue coverage in
server/lib/schemaUpgradeSteps.js (the "swimlane-structure" step) plus
regression tests in tests/schemaUpgradeSteps.test.cjs, and "templated
users" was explicitly out of scope per the issue's own text.
Thanks to andresmanelli and xet7 !
WeKan only ever sent email; there was no way to receive it, so replying to a
notification email went nowhere. This adds the webhook-based half of #2414 -
not an IMAP-polling mail client, which would need a running mailbox,
credentials and a polling loop the self-hoster would have to operate. Instead
a self-hoster points a mail provider's inbound-parse webhook (Mailgun Routes,
SendGrid Inbound Parse, Postmark inbound - documented in
docs/Features/Email/Reply-By-Email.md) at a new POST /api/inbound-email.
Every outbound notification email's Reply-To now carries
reply+<cardId>-<hmac>@<domain> (server/lib/inboundEmailReplyToken.js), the
HMAC keyed by INBOUND_EMAIL_HMAC_SECRET so it cannot be forged or guessed.
The webhook verifies that token, resolves the card, strips the reply's quoted
text (server/lib/inboundEmailQuoteStrip.js), matches the sender's address to
an existing WeKan user (server/lib/inboundEmailUserMatch.js - no match is
rejected, never an anonymous comment), and inserts a CardComments document.
Unauthenticated by design, so every rejection (bad/forged token, unmatched
sender) is logged via securityLog under the new authn.inbound-email catalog
key, wrapped so logging can never break the guard.
Both INBOUND_EMAIL_HMAC_SECRET and INBOUND_EMAIL_DOMAIN are opt-in; unset
(the default), no Reply-To is added and existing installs are unchanged.
Thanks to vasyugan and xet7 !
Closes#2414,
Copy/link rule actions (#4160, #3235), email attachments (#3948),
custom-field rule values (#3195), GitLab sync (#2698), a scheduled
due-date rule action (#4278) and more template variables (#3815) are
each a real feature or need external infrastructure this sandbox
cannot stand up, so they are recorded with their reasons rather than
forced.
Adds a board-wide Boards.allowsSwimlaneNameOnMinicard toggle (default
false), a Card Settings row for it (already landed in
client/components/sidebar/sidebar.jade/.js and models/boards.js via a
concurrent commit), and the minicard label itself: gated on the board
flag, resolving the swimlane reactively via
ReactiveCache.getSwimlane(card.swimlaneId), styled like the existing
list-name label. tests/minicardSwimlaneNameOnMinicard.test.cjs pins the
default, the Card Settings row, and that the minicard only renders the
label when enabled.
Thanks to JB_Pollard and xet7 !
Closes#2426,
Admin Panel -> Settings -> Visibility gets a new "External Issue Tracker
Autolink" group: a token prefix (e.g. "#") and a URL template containing
"{number}" (e.g. https://issues.example.com/browse/PROJ-{number}). When both
are set, a bare "<prefix><digits>" token found in card descriptions/comments
is rendered as a link to that external tracker, the same idea as the
Mattermost autolink plugin. Either field left empty keeps the feature off.
WeKan does not autolink bare "#NNNN" to its own cards anywhere - confirmed by
reading the whole markdown pipeline (packages/markdown) and every client
template before adding this, per models/lib/externalLinkAutolink.js's own
comment - so there is nothing internal for this to collide with. It stays
safe regardless: off by default, and it never rewrites a token that already
sits inside an existing markdown link target or an href="..." attribute.
models/lib/externalLinkAutolink.js is the pure, unit-tested matching/URL-
building function; packages/markdown/src/template-integration.js cannot
import app code, so it carries its own small mirror of the same algorithm,
bridged from the setting via a ReactiveVar the same way alwaysShowCodeAsText
already is, kept in sync by client/components/main/editor.js.
server/publications/settings.js publishes the two new fields - a setting a
template reads that the publication does not send always renders empty and
makes "Save" look like it did nothing.
Adds the "external-link-pattern"/-description/-prefix/-url keys to
en.i18n.json and all 245 other locale files, translated directly (no
placeholder service), preserving the "{number}" placeholder untouched in
every language. tests/externalLinkAutolink.test.cjs covers the pure function
(matching, URL building, no-op when unconfigured, the existing-link
collision guard), the settings/publication/bridge wiring, i18n key placement
and placeholder preservation across every locale file, and confirms by
source inspection that no internal #NNNN-to-card autolinker exists anywhere
in the tree.
Concurrent edits to server/rulesHelper.js's sendEmail block in this shared
checkout dropped the "Description: ..." footer line added earlier for
#2713 (the description sits right next to the pre-existing "Card:"/"Link:"
lines from #3301, so it merged awkwardly). Restoring it: the sendEmail
action now appends the card's description automatically again, same as its
title and link, guarded the same way (only when non-empty).
Thanks to kabi178 and xet7 !
server/triggersDef.js now registers the 'a-dueAt'/'a-startAt'/'a-endAt'/
'a-receivedAt' activityTypes that models/cards.js's setDue/setStart/
setEnd/setReceived already log via server/models/cards.js's timing-field
hook (the same activity the due-date-change-count feature, #6081, already
reads). This wires those existing activities into the Rules matcher so a
rule can trigger "when the due/start/end/received date is set or changed",
reusing the TriggersDef-driven matching machinery every other trigger
already uses.
Thanks to justinr1234 and xet7 !
Closes#2474,
The card detail view and minicard already rendered a card's accumulated
spent-time badge (and its overtime indicator) unconditionally once time was
logged, but there was no way to turn it off, and reaching it in the first
place meant the card's hamburger/context menu. Add allowsSpentTime /
allowsSpentTimeOnMinicard board fields (both default true, so no existing
board's display changes) and a matching Card Settings row - the same
"Show on card"/"Show on minicard" pattern already used by
allowsReceivedDate/allowsReceivedDateOnMinicard - so an admin can hide it
per board.
Thanks to matrixes and xet7 !
Closes#2530,