Commit Graph
2224 Commits
Author SHA1 Message Date
Lauri Ojansivu 130af564c9 Docker image: distroless, with a Node.js entrypoint and no shell.
Artifact Hub's Trivy report of v13.30 listed 218 vulnerabilities in
ghcr.io/wekan/wekan, 214 of them in Debian packages WeKan never runs
(util-linux, login, tar, coreutils, systemd libraries, sqlite) with no
Debian fix to update to. The image is now gcr.io/distroless/cc-debian13
plus libatomic1, node, WeKan, FerretDB and the MongoDB tools; that base
scans at 55 findings, 2 HIGH. Distroless publishes no linux/386, so for
386 the same Debian 13 packages are assembled into scratch, each with
its dpkg record; the release workflow reads both bases from the
Dockerfile and the image keeps all seven platforms. The wekan user
stays 999:999.

With no shell, releases/ferretdb/wekan-entrypoint.mjs replaces
wekan-entrypoint.sh, with the same decisions, exported and tested. It
runs sqlite-recovery.mjs with its own node: the shell entrypoint ran
/build/node, which the image never had, so every start with the bundled
FerretDB stopped with status 127 since v11.52. It also makes cpu-exec's
qemu-user decision itself. The UCS migration launcher and tools, the
UCS hook's volume preparation (ucs-release.py), the MongoDB tool
launchers (symlinks to mongo-tools) and the Nextcloud capability check
run node instead of sh.

Thanks to xet7 !
2026-11-25 00:32:06 +02:00
Lauri Ojansivu 7e1f9e89eb Docs: every feature topic in one folder under docs/Features, each with README.md as its main page.
- The General/ level is gone: its 109 files moved up into the folders of the
  same name, and its topic table is the "Shared topics" section of
  Features.md.
- Accessibility is one folder, docs/Features/Accessibility/, with the Admin
  Panel's accessibility page in it.
- Every folder's main page is README.md (110 X/X.md pages renamed with git mv,
  five merged with an existing README.md, 26 index pages added for folders
  that had none), so a folder opened on GitHub shows its page.
- The 73 "# Moved" forwarding pages are deleted, with the folders that held
  only them; every link that went to one goes to its final page.
- docs/Features/README.md has the website's "Features in WeKan" overview,
  each feature linking to its page here.

1,129 Markdown links in 262 files and 352 doc paths in code, tests, compose,
snap and release files follow. tests/docsFeaturesLayout.test.cjs fails when
General/ or a "# Moved" page comes back, a folder has no README.md, or a
relative link in the docs or README.md does not resolve.

Thanks to xet7 !
2026-11-24 20:02:06 +02:00
Lauri Ojansivu 5ba1098521 Server tests pass again: four faults the repaired test build found, fixed.
- A password sign-in refused by policy (PASSWORD_LOGIN_ENABLED=false,
  forgot password off, LDAP's password-login guard) was counted by the
  lockout as a wrong password, which threw its own 403 "Incorrect password"
  over the policy's error: the person was told the wrong thing, and enough
  attempts locked the account because of a setting. Policy refusals are no
  guesses now (loginFailureDecision.js).
- Auto-archive fetched its boards without their members, so boardActorId
  found nobody and every auto-archive was recorded as no user.
- Every upload got two "added" rows in the card history: the upload hook's
  and the content index's. The index writes its row only for an attachment
  that has none, and never for a durable rule copy, whose plan writes it.
- Not found is undefined from Meteor 3's findOneAsync: the Admin Panel
  addresses test accepts either.

meteor test --full-app: 699 passing, 0 failing (was 693 / 6).

Thanks to xet7 !
2026-11-24 17:49:56 +02:00
Lauri Ojansivu 788131193e Admin Panel / Problems / Summary: sign-in refusals grouped by reason, with count, latest account and how to fix it.
The person signing in still sees the same generic message whatever the
reason, so a signed-out visitor cannot tell "no such user" from "wrong
password". Every refusal is recorded with its precise reason
(models/lib/loginRefusals.js, server/lib/loginRefusals.js): wrong password,
unknown user, disabled account, brake, malformed request, and the LDAP
reasons, which the LDAP handler now records before returning its one generic
error - including the two messages that used to name the account. Problems /
Summary groups them like a status dashboard: one row per reason with its
count, first and latest time, latest account and address, the fix and the
Admin Panel pane where it is made, and each problem area lists its three most
frequent problems. Translated to every language.

Thanks to Raymond-Voogt and xet7 !

Fixes #6942,
2026-11-24 17:49:45 +02:00
Lauri Ojansivu 6cde02380a Admin Panel / Attachments / Encrypt: attachments on disk encrypted with ATTACHMENTS_PASSPHRASE, at the same addresses.
The last item of docs/Compliance/README.md's P3 list, on the maintainer's
decision: while ATTACHMENTS_PASSPHRASE is set (at least 16 characters), a
site administrator gets Admin Panel / Attachments / Encrypt, which
encrypts or decrypts every attachment on this server's disk in the
background with progress, and turns on encryption of new attachments.

- AES-256-CTR (server/lib/attachmentEncryption.js), so a download can
  start anywhere: the counter for any byte is the IV plus its block. The
  key is stretched from the passphrase with scrypt once per salt and kept
  in memory. Each file starts with WKATT1, the salt and its own IV; a file
  without the header is plain and read as before.
- Every read goes through FileStoreStrategyFilesystem.getReadStream, which
  decrypts - byte ranges included - so every address, preview, export and
  storage move is unchanged; the board export and the WebDAV move, which
  read the file directly, use the same decrypting read.
- New uploads are encrypted after their validation and indexing, which
  need the plain file; imports, e-mail to card and the REST API by an
  hourly sweep. Each changed attachment's meta.updatedAt is set, so the
  filesystem integrity scan sees the change explained. The runs and the
  switch are in the Audit log.
- On every platform, the snap and the Helm chart (from a Secret).

Tested against a live server (tests/playwright/specs/attachment-encryption.e2e.js):
an attachment encrypted on disk downloads at the same address, whole and
as a byte range, and decrypts back to the same bytes. Seven new strings,
translated in every language. Low confidence: ace, ak, ay, bi, bm, bo, bua,
chr, csb, dz, ee, ff, fj, gn, gv, haw, iu, kl, kok, ks, kw, lg, lld, nah,
nap, nd, nso, fur, mg, tlh, tig, ti, wal, om, ve-PP, ve-CC, rup, zgh, uz-AR,
sah, vo, wuu-Hans, se, qu, to, sm, ss, ts, ve, ny, rn, tn, st, wa, sc, scn.

Thanks to xet7 !
2026-11-24 13:19:44 +02:00
Lauri Ojansivu a242275be8 Where I am signed in, with Sign out per session; and BACKUP_PASSPHRASE encrypts the Admin Panel backups.
The last of docs/Compliance/README.md's P3 list:

- Member Settings / Privacy and my data lists every session of the
  account - this browser first, when each signed in, and when last active
  where idle logout records it - each with Sign out, which ends just that
  one. A session is named by an opaque id, never its token or hash.
  Admin Panel / People's user popup has Log out everywhere for an account
  (adminLogoutUser, in the Audit log) (models/lib/sessionList.js,
  server/methods/sessions.js).
- BACKUP_PASSPHRASE encrypts every Admin Panel backup as it is written, to
  disk or to cloud storage: AES-256-GCM, the key stretched with scrypt, the
  salt and IV in the file's own header. A restore recognises the header,
  decrypts beside the file and removes the copy whatever happens; a wrong
  passphrase or a changed file is refused, and an older plain backup still
  restores (server/lib/backupEncryption.js). On every platform, the snap and
  the Helm chart (from a Secret).

App-level encryption of attachments on disk is left to a maintainer
decision (TODO.md): disk encryption covers it without changing every read
path.

Tested against a live server: tests/playwright/specs/backup-passphrase.e2e.js
writes an encrypted backup and restores it, and compliance-p3.e2e.js ends one
session of two. Four new strings, translated in every language. Low
confidence: ace, ak, ay, bi, bm, bua, chr, csb, cv, dz, ee, ff, fj, gn, gv,
haw, iu, kl, kok, ks, kw, lg, lld, nah, nd, nso, bo, fur, mai, bho, ary,
tig, ti, wal, ve-PP, ve-CC, ve, vo, tlh, zgh, wa, wa-RR, rup, sah, se, scn,
sc, sm, to, tpi, ts, ss, st, tn, rn, rw, ny, om, pap, qu, rm, szl, uz-AR,
ug, tt, yi, yue_CN, wuu-Hans, wo, xh.

Thanks to xet7 !
2026-11-24 05:56:38 +02:00
Lauri Ojansivu 77986e1d65 Emergency access, a hash-chained audit log, a minimum age on sign-up, and a records of processing draft.
From docs/Compliance/README.md's P3 list and row 2.2:

- Emergency access: Admin Panel / People's user popup has "Emergency
  access" with a note before Impersonate. It is kept as reason emergency
  with the note (shown in the Impersonation Report), and every other
  administrator who can sign in gets an e-mail at once; a failed e-mail
  never stops the impersonation (models/lib/emergencyAccess.js).
- The administrators' audit log is hash-chained: each row carries its
  place, the previous row's hash and its own. Its _id is its place, so two
  servers writing at once cannot both take it - the unique _id refuses the
  second, which takes the next. A daily check, and verifyAdminAuditChain,
  walk it from the oldest row kept and report an edited or removed row in
  Problems / Filesystem integrity (models/lib/auditChain.js).
- REGISTRATION_MINIMUM_AGE: the sign-up form asks "I am at least N years
  old" and a password sign-up without it is refused; administrators'
  accounts and identity providers' are not asked, and nothing is stored
  (models/lib/registrationAge.js). On every platform and the Helm chart.
- Records of processing (draft) in Admin Panel / Settings / Legal pages:
  every collection holding personal data, why, how long with this server's
  values, and the outside services this server really uses, as Markdown to
  complete (models/lib/ropaDraft.js).

Seven new strings, translated in every language. Low confidence: chr, dz,
bo, gv, ak, ay, bm, ee, ff, fj, gn, haw, bua, cv, ba, csb, ace, bi, fur, an,
ast-ES, co, fo, hsb, gd, ht, bho, as, iu, kl, kw, ks, nah, rup, sah, lld,
szl, sm, ss, nd, qu, om, pap, lg, rn, rw, nso, st, sn, ny, mai, kok, sc,
scn, nap, mg, la, ig, ky, ja-HI, tig, tlh, vo, ve-PP, wal, zgh, uz-AR, to,
tpi, ts, tn, ve, wa, wa-RR, wo, wuu-Hans, yi, yo, tk_TM, ug, tt, ti, oc, rm,
sd, ps. The wrong-language catalog values the translators saw are in
TODO.md.

Thanks to xet7 !
2026-11-24 05:35:15 +02:00
Lauri Ojansivu 77b9bc984a Problems / Summary says when a newer WeKan is available, from the administrator's own Check version.
docs/Compliance/README.md P3 ([CRA] Annex I Part II(8)): Check version in
Admin Panel / Settings / Version now keeps what it found
(versionChecks, one document), and Summary lists "A newer WeKan is
available" while that check named a newer WeKan than this server runs,
with the date of the check and that security fixes go into the newest
release only. WeKan still never asks wekan.fi on its own: Summary only
repeats the check an administrator ran, and a test pins that only the
button fetches.

Thanks to xet7 !
2026-11-24 05:18:03 +02:00
Lauri Ojansivu 92fc9b686a LOGIN_ADDRESS_RECORDED=false records no sign-in address, and USERS_ANONYMIZE_INACTIVE_AFTER_DAYS anonymises long-disabled accounts.
Two items of docs/Compliance/README.md's P3 list ([GDPR] Art. 5(1)(c) data
minimisation and 5(1)(e) storage limitation):

- LOGIN_ADDRESS_RECORDED=false: WeKan writes down no sign-in address at
  all - not on the account, not in Login locations or Offices; a sign-in
  with a short password is still listed, without where from. The lockout
  still counts failed sign-ins per address, to stop guessing.
- USERS_ANONYMIZE_INACTIVE_AFTER_DAYS: an account disabled for inactivity
  (USERS_DISABLE_INACTIVE_AFTER_DAYS) is anonymised that many days later,
  as Member Settings / Anonymize does - its data elsewhere erased first -
  in the same nightly run. Disabling now records loginDisabledAt, enabling
  clears it, and accounts disabled before it existed start their clock
  now. Never an administrator, an account disabled by hand or by LDAP, or
  one enabled again; off unless set.

Both on every platform, the snap and the Helm chart.

Thanks to xet7 !
2026-11-24 05:08:23 +02:00
Lauri Ojansivu aa9a4ba2ea Accepting the terms works: the account keeps the acceptance, and the box can be ticked.
Found by running tests/playwright/specs/legal-acceptance.e2e.js against a
live server:

- The users schema did not know legalAcceptances, so collection2 dropped
  every acceptance without an error: the dialog closed, and the next sign-in
  asked again. It is in the schema now.
- The global form rules hide native checkboxes, so the acceptance dialog,
  the sign-up box and the Published and Require acceptance switches of
  Admin Panel / Settings / Legal pages had nothing to tick. They are shown,
  with the whole line as the target, and the Accept button looks disabled
  until every page is ticked.
- The gate re-reads the requirement before it refuses anything, so one
  turned off elsewhere - another server process, or the database - never
  blocks anybody for the minute until the next refresh.

The spec waits for the page the acceptance reloads. And
tests/crossSiteRequest.test.cjs allows the data-access log's raw handler,
which only listens for a finished 200 and never answers or reads the
cookie.

Thanks to xet7 !
2026-11-24 04:55:33 +02:00
Lauri Ojansivu eb144f07c9 Admin Panel / Problems / Compliance: the settings the laws and standards look for, checked.
docs/Compliance/README.md WP-12: a read-only checklist, second in the
Problems menu - two-factor authentication required, idle sign-out, HTTPS
with HSTS, sign-in address retention, the audit log kept 2190 days or more
(for information: HIPAA), the privacy notice published, the imprint
published (for information: Germany and Austria), the security contact for
security.txt, and the continuous backup encrypted. Each row says OK, Check
or For information, shows the value this server has, and links to the
pane that changes it. models/lib/complianceChecks.js decides from the facts
getComplianceChecks reads, for site administrators only; it changes
nothing.

Fourteen new strings, translated in every language. Low confidence: chr,
bo, dz, gv, bua, ay, gn, ff, bm, ak, ee, fj, bi, ace, cv, ba, csb, hsb, br,
co, fur, fo, haw, ary, bho, an, iu, kl, kw, nah, qu, rup, sah, se, szl, lld,
ks, sm, lg, rn, rw, nso, ss, st, nd, om, pap, mg, la, nap, scn, tig, wal,
ve-PP, tlh, vo, zgh, wuu-Hans, to, ve, uz-AR, ve-CC, wa, wa-RR.

Thanks to xet7 !
2026-11-24 04:17:23 +02:00
Lauri Ojansivu 1319f01e17 Data access in the Audit log, and AUDIT_LOG_STDOUT=json for a SIEM.
docs/Compliance/README.md WP-11 (rows 4.2 and 4.3 b):

- Admin Panel / People / Audit log has a Data access tab: who downloaded
  what - a board as JSON, CSV, Excel, PDF or ZIP, a chart, a card, every
  board, a person's data, an Admin Panel list - one row per person, day,
  kind and target with a count, the first and last time and the last
  address, never a row per download. A raw middleware in front of every
  route (server/lib/dataAccessLog.js) counts each export that answers 200,
  and a test fails when an export route is not in its list. Kept as the
  audit log (ADMIN_AUDIT_RETENTION_DAYS); erasing an account removes its
  username and address from it. Export CSV on the tab.
- AUDIT_LOG_STDOUT=json writes every audit row, security problem and data
  access also to stdout as one JSON line ({"wekan":"audit"|"security"|
  "data-access", ...}), with only the fields the Admin Panel shows - the
  arguments as stored, already redacted (models/lib/auditStdout.js). On
  every platform's settings, the snap and the Helm chart.
- The admin CSV exports obey Admin Panel's switch that turns all export
  off.

Five new strings, translated in every language. Low confidence: ace, ak,
ay, bi, bm, bo, bua, chr, csb, cv, dz, ee, ff, fj, gn, gv, haw, fur, co, ba,
bho, as, br, an, ast-ES, ha, ht, fo, iu, kl, ks, kw, nah, lld, rup, qu, sah,
se, szl, nap, scn, sc, rm, pap, lg, rn, nd, ss, nso, st, sn, ny, om, mai,
kok, la, sm, mi, tig, ve-PP, vo, wal, tlh, zgh, uz-AR, to, tpi, ts, ve, wa,
wa-RR, wo, yo, yi.

Thanks to xet7 !
2026-11-24 04:17:13 +02:00
Lauri Ojansivu ea95943687 CSV exports for access reviews and incidents, and one's own sign-in history.
docs/Compliance/README.md WP-10 (rows 3.8, 4.3 a and 5.6): Export CSV on
Admin Panel / People, Problems / Boards, Problems / Security and the Audit
log gives the whole list, not the page on screen, and People and Boards
also give Boards and roles as CSV - one row per board member with the
role, for every board, the access review itself.
server/routes/adminCsvExport.js serves them to a site administrator only,
streamed from a cursor, and records every download - a refused one too -
in the Audit log as exportAdminCsv. Each dataset
(models/lib/adminCsvExport.js) reads only the fields it names, so no
password, token, two-factor secret or key can reach a file, and a cell a
spreadsheet would run as a formula is written as text.

Member Settings / Privacy and my data lists Where I signed in from: each
address of the account, how often, first and last time
(getMyLoginHistory, one's own only).

Three new strings, translated in every language. Low confidence: ace, ak,
ay, bi, bm, bo, bua, chr, csb, cv, dz, ee, ff, fj, fo, fur, gn, gv, haw, ba,
bho, ary, co, an, ast-ES, iu, kl, kw, nah, lld, rup, nap, scn, sc, szl, ks,
kok, mai, sah, se, om, qu, rm, pap, nd, ss, nso, sm, sn, rn, lg, ny, mg,
tig, tlh, to, tpi, ts, tn, uz-AR, ve-CC, ve-PP, ve, vo, wa-RR, wa, wal, wo,
zgh, tk_TM, ug, tt. The wrong-language values the translators saw are
listed in TODO.md.

Thanks to xet7 !
2026-11-24 03:44:59 +02:00
Lauri Ojansivu 1652c86f55 security.txt, the support period and an SBOM on every release, and an operator guide for GDPR, HIPAA and NIS2.
docs/Compliance/README.md WP-9 (rows 5.2, 5.3 and 5.5):

- /.well-known/security.txt and /security.txt (RFC 9116) are made from the
  security contact of Admin Panel / Settings / Legal pages: one Contact per
  address (an e-mail becomes mailto:, only https: URLs are kept), Expires
  180 days ahead, Canonical from ROOT_URL. 404 while no contact is set.
- SECURITY.md has a Support period: security fixes go into the newest
  release only, with no backports.
- The sbom job of release-all.yml writes the CycloneDX SBOM with npm's own
  npm sbom from the tagged package-lock.json and attaches it as
  wekan-<version>-sbom.cdx.json; Admin Panel / Settings / Version links the
  one of the running version. The Docker image attestation stays off.
- docs/Security/Compliance/README.md: what WeKan provides for GDPR, HIPAA,
  NIS2, ISO 27001 and SOC 2, the recommended settings, encryption at rest,
  break-glass access, and DPA/BAA notes.

Thanks to xet7 !
2026-11-24 03:44:47 +02:00
Lauri Ojansivu adf479272a Terms and privacy notice: versioned acceptance, required per page by an administrator.
Admin Panel / Settings / Legal pages has Require acceptance for the terms
of use and the privacy notice (docs/Compliance/README.md WP-8, row 1.7).
While it is on, an account that has not accepted the current version of
each such page sees only the acceptance dialog after signing in, and the
server refuses every method outside an allowlist and sends nothing from
its publications (server/requireLegalAcceptance.js, built like
REQUIRE_2FA's gate). A new version of the text is asked for again; only
the version that is current when accepting is recorded, so an older text
cannot be accepted for a newer one. Each acceptance is kept as
legalAcceptances.<page> = { version, at }, shown in Member Settings /
Privacy and my data and part of Download my data. The sign-up form shows
an optional "I accept" checkbox meanwhile. The REST API is not gated.

Seven new strings, translated in every language. Low confidence: ace, ak,
ay, ba, bm, bo, bua, chr, csb, cv, dz, ee, ff, fj, gn, gv, haw, fur, hsb,
iu, kl, ks, kw, lg, lld, nah, nap, nd, nso, ig, mi, kok, mai, la, rup,
sah, qu, se, szl, ss, sc, scn, om, ny, pap, rn, sm, sn, st, rm, oc, sd, ps,
or_IN, tig, tlh, vo, ve-PP, wal, wa, zgh, uz-AR, ve-CC, wuu-Hans.

Venetian (ve-CC) and Veps (ve-PP) had Venda, and Waray (wa-RR) had
Walloon (and one English value), in the legal-pages strings and some
older ones; those are now in the tag's own language, with a guard
(tests/wrongLanguageCorrections20261124.test.cjs). Low confidence for
those three.

Thanks to xet7 !
2026-11-24 03:21:55 +02:00
Lauri Ojansivu 176771109c Retention: the audit log, board activities and workload absences each have a limit an operator sets.
ADMIN_AUDIT_RETENTION_DAYS replaces the fixed year of the administrators'
audit log (365 by default, 0 keeps it, HIPAA sets 2190 or more).
ACTIVITIES_RETENTION_DAYS removes board activity rows older than that, and
WORKLOAD_ABSENCE_RETENTION_DAYS absences that ended that long ago, both off
by default; the change history of cards is never removed.
WORKLOAD_ABSENCE_TYPE_RECORDED=false stores every new absence as "other", so
no sick leave is recorded. Admin Panel / Settings / Legal pages shows every
personal-data collection with its retention and the value of its setting on
this server. Listed on every platform, the Helm chart included
(docs/Compliance/README.md WP-7, rows 2.5, 2.7 and 2.8).

Thanks to xet7 !
2026-11-24 02:59:10 +02:00
Lauri Ojansivu 29a41bd51c Legal pages: privacy notice, terms, cookie notice and imprint, and Member Settings / Privacy and my data.
An operator publishes them in Admin Panel / Settings / Legal pages; anybody,
signed in or not, reads the published ones at /privacy, /terms, /cookies and
/imprint, linked from the login page and from Member Settings / Privacy and
my data, which also holds Download my data. The imprint has its structured
fields, shown only when filled; the privacy contacts (privacy contact, data
protection officer, EU representative, security contact) are shown on the
privacy notice. The pane offers a privacy notice draft built from the
personal-data inventory, and the inventory itself. Saving is for site
administrators only and is in the Audit log; nothing is written from the
browser. A page's version goes up when what a reader sees changes. Matomo,
when an operator turns it on, now runs with disableCookies. The 30 new
interface strings are translated into every language; low confidence: the
Tigre strings for privacy, published and authority, and Aromanian "Cuprins".
(docs/Compliance/README.md WP-6, rows 1.8 and 7.1 to 7.5.)

Thanks to xet7 !
2026-11-24 02:44:07 +02:00
Lauri Ojansivu 7a25e33ca7 Download my data: everything WeKan holds about a person, as a ZIP of JSON.
Member Settings / Download my data and GET /api/user/export give the
signed-in person their account without secrets and every row of every
collection the personal-data inventory says holds their data, with a
manifest of what is in it and what is not, and why. Of a shared board, card
or list only their own part. Secrets are removed at every depth. An
administrator can export any account with userId=, recorded in the Audit
log. The menu label is translated in every language (docs/Compliance/README.md
WP-5; WP-4 recorded there too).

Thanks to xet7 !
2026-11-24 01:57:14 +02:00
Lauri Ojansivu 5dff6c0ec9 Erasing a person removes their data from every collection the inventory lists, on deletion and on anonymisation.
Deleting an account removed only the users document and its board, card and
list memberships; 40 collections the personal-data inventory marks for
deletion or anonymisation kept the person - workload, time entries, sign-in
addresses, sessions, jobs, credentials, notifications, reactions, event-log
tallies. models/lib/userErasure.js holds a rule per collection and runs on
deletion (Users.after.remove) and anonymisation (anonymizeUser); an invoiced
time entry is kept without the person, and an anonymised account keeps its
references. Integrity-checked delivery records are reduced to ids by their
compaction, which the inventory now names. Anonymisation replaces services
whole and clears sign-in addresses, passkeys, SQRL, push and ntfy, e-mail to
card and the e-mail buffer. The inventory's gap list is empty
(docs/Compliance/README.md WP-4).

Thanks to xet7 !
2026-11-24 01:57:13 +02:00
Lauri Ojansivu 7042d228e6 Broken cards: the Summary counts and repairs the cards of an unknown type that the pane lists.
The Broken cards pane listed a card whose type is not one of the four WeKan
shows; the Summary's "Broken cards N" and its repair looked only at a missing
board, swimlane or list, so such a card was never counted and never fixed.
"Broken" is one definition now, brokenCardsSelector of
models/lib/brokenCardsRepair.js, used by the pane, the count and the repair,
and the repair gives such a card the plain card type.

Thanks to xet7 !
2026-11-24 01:08:53 +02:00
Lauri Ojansivu 4cb1bbfe57 Login lockout: the increasing delay after a wrong password is applied.
The delay per user and source address (1 second after the first wrong
password, doubling up to 30) never ran: the server's startup and the Admin
Panel's reload built the lockout's settings from failuresBeforeLockout,
lockoutPeriod and failureWindow only, so loginDelayBase reached the decision
as undefined, which is "delays off". Every setting is now read from one list,
models/lib/lockoutConfig.js, by both and by the model's helpers; a stored 0
still switches the delay off, and an unreadable setting still falls back to
its default. The reload gets that per-setting fallback too.

Thanks to xet7 !
2026-11-24 01:08:40 +02:00
Lauri Ojansivu c2602fcd86 Admin Panel recovery list shows cancelled notifications only while recent.
A cancelled activity notification is a permanent receipt, kept so a delayed
writer cannot recreate its payload, and the recovery report listed every one
ever written. Since #6768 cancels expired notifications automatically, the
list grew into dozens of pages of old rows that hid the recoverable ones.
Pending notifications are always listed; cancelled receipts only while their
activity is newer than ACTIVITY_NOTIFICATION_RECOVERY_CANCELLED_DAYS (default
14, 0 lists none). Read-side only: no receipt is removed.

Thanks to Raymond-Voogt and xet7 !

Fixes #6941.
2026-11-23 21:45:05 +02:00
Lauri Ojansivu c54e70f777 Time can be logged on imported cards whose spentTime was stored as null.
The board import stored spentTime: card.spentTime || null, and MongoDB and
FerretDB refuse the $inc that logs time on a null, so /cards/updateAsync
failed on every such card. The importers now store a Number. The Cards and
Boards before.update hooks turn an $inc of a stored non-number into the $set
of the sum (models/lib/spentTime.js) - not an update pipeline, which FerretDB
v1, Minimongo and allow/deny refuse. The startup step spenttime-null-repair
resets the stored nulls to 0. Checked against FerretDB: the bare $inc and the
pipeline are both refused there, the hook's $set and the repair step work.

Thanks to Raymond-Voogt and xet7 !

Fixes #6940.
2026-11-23 21:45:05 +02:00
Lauri Ojansivu ecf63b0ccc ListLockMoveBleed: the REST swimlane move asks the per-list gate, as its delete and the moveSwimlane method do.
A member refused write access to a list could move the whole swimlane to
another board with POST /api/boards/:boardId/swimlanes/:swimlaneId/move: the
route asked only for board write access, and the locked list's cards landed
in lists on the other board with no exceptions, where the member could edit
or delete them. Now the route refuses with 403 when a list holding the
swimlane's cards refuses the caller's role, and the attempt is shown in
Admin Panel / Problems as ListLockMoveBleed (authz.list-locked-move). A test
fails when any server code moves a swimlane without asking the gate.

Also: a card move outside a Meteor method read Meteor.userId(), which throws
on the server there, so every REST swimlane move answered 500 after its first
card had moved. The mover is read without throwing.

GHSA-394w-8q99-q4qx.

Thanks to adityasunny06help-coder and xet7 !
2026-11-22 21:30:17 +02:00
Lauri Ojansivu 1abb202030 Tests: a Shop invoice line is a Product, an unknown kind is refused, and every list of the line kinds names Product.
tests/billingLineKinds.test.cjs:
- Product is a kind with a label, and isInvoiceLineKind takes it;
- negative: an unknown kind ('gift', a wrong case, empty, not a string) is
  refused, the schema lists exactly the library's kinds, and the Shop's
  invoice refuses a line of a kind billing does not know;
- a shop invoice line is a product with its card, quantity and unit price,
  and the lines add up to the net with VAT taken out;
- the e-invoice writes a product as pieces (H87) at its unit price, one unit
  (C62) when there is no whole unit price, and a fee as before;
- a source scan of models, server, client, imports and config: every place
  that names the fee and the expense kinds together - as strings, label keys
  or style classes - names product too, so a new output that forgets it
  fails;
- the label is translated in every language, with no placeholder.

tests/billingAccess.test.cjs holds the schema's kinds to the library's list,
and the Shop mocha test expects its invoice line as a product of 3 at 5 EUR.

Thanks to xet7 !
2026-11-22 21:18:58 +02:00
Lauri Ojansivu ac7c3d93fe Budget and billing: a Product kind of invoice line, and the Shop's invoices use it.
An invoice line was time, a fee or an expense; an order of Board View /
Shop was invoiced as fees. Product is now a kind of its own: a quantity at a
unit price, naming the product card.

- The kinds are one list, INVOICE_LINE_KINDS in models/lib/billing.js, with
  a label key for each kind a line names (LINE_KIND_LABEL_KEYS) and
  isInvoiceLineKind; the invoice schema takes exactly these kinds and the new
  optional quantity and unitMinor of a product line. An unknown kind is
  still refused, by the schema and by the Shop's invoice before it is
  written.
- The Budget and billing page labels a line by that table, so a product
  line reads Product; the draft list styles it like a fee or an expense.
- The e-invoice (UBL 2.1, Peppol BIS 3.0) writes a product as its quantity
  in pieces (UN/ECE H87) at its unit price, and - when the net does not
  divide into a whole unit price - as one unit (C62) at its amount, as a fee
  and an expense are written. Time lines are unchanged.
- The Shop's invoice lines are products, and they add up to the invoice's
  NET: with prices that include VAT the net is shared over the lines in
  proportion to their prices, the rounding remainder on the last line, so
  the lines, net, VAT and total agree on the invoice and in the e-invoice.
  Before, those lines carried the prices with the VAT in them.

Existing fee lines are unchanged, and nothing is migrated: the PDF, SVG,
Excel and CSV write a line by its amount whatever its kind, as before.

Thanks to xet7 !
2026-11-22 21:18:28 +02:00
Lauri Ojansivu 1083b52a36 Shop tests: the invoice, the confirmation email and the board copy, and what each must never do.
- tests/shop.test.cjs: a copied board's shop is closed with no Orders list,
  fields or lists of the source, and Board.copy() - the only place a board is
  inserted from another - resets it before the insert, while an import leaves
  it out; the email has the number, lines, VAT, total, how to pay and the
  reference, a one-line subject a shop title can not inject a header into,
  no javascript: link, and an HTML part that escapes a product title; the
  three new strings keep their placeholders in every language; the server
  makes the invoice only with billing on, removes it with a failed order,
  uses billing's numbering and the order's reference, and sends the email
  after the order is stored through a sender that never throws.
- server/lib/tests/shop.tests.js: with Budget and billing off no invoice is
  made; on, the invoice has the order's reference and total and the card
  names it; the confirmation is captured in Finnish with the IBAN line and an
  escaped HTML part; a mail server that fails leaves the order standing; the
  shop's setting turns the email off; copyBoard gives a closed shop with no
  Orders list that takes no order.
- tests/playwright/specs/shop-view.e2e.js: the checkout shows the invoice
  number, and the invoice has the order card's payment reference.

Thanks to xet7 !
2026-11-22 20:41:47 +02:00
Lauri Ojansivu c7b48bce2f Shop: an order is also a Budget and billing invoice, the buyer gets a confirmation email, and a board copy closes its shop.
Budget and billing invoice. When Budget and billing is on (Admin Panel /
Settings / Features) for the admin whose Board Settings / Shop takes the
orders, and they are still an admin of the shop's board, shopPlaceOrder also
writes the order into billing's own invoices of that board
(server/lib/shopInvoice.js): billing's numbering INV-<year>-<number>, the
board's Invoicer profile and payment terms, status Sent, the order number as
its reference, the buyer as its customer, one fixed-price line per product
naming its card, and the ORDER's payment reference, so the card, the invoice
and the payment all name the same one. The order card says which invoice it
is, and the checkout shows its number. An order that fails after the invoice
was made removes it again. With Budget and billing off, no invoice.

Confirmation email. After the order is stored the buyer gets its number,
lines, totals with VAT, the payment method with its reference and account
lines, an https payment link and the shop's name, in the language of their
browser (server/lib/shopEmail.js, models/lib/shop.js orderEmail). It goes
through Meteor's Email, so Admin Panel / E-mail / Bounces takes out a stopped
address and the SMTP limits hold; it is not sent without MAIL_URL, when the
new Board Settings / Shop row "Send the buyer an order confirmation by email"
is unticked, or to a stopped address. The subject is one line; the HTML part
is the account email layout of the plain text, which escapes every
character. A failed send is recorded in Admin Panel / Problems / Email and
never fails the order. No QR image: the mail code has no inline images.

A board copy. Board.copy() - the copyBoard method, the REST copy route and
the board templates - resets shopSettings (copiedShopSettings): the copy's
shop is closed, and its Orders list, the price, product code and stock
fields and the lists on sale, which are the source board's, are cleared, so
a copy never takes orders into the source's Orders list. Board Settings /
Shop on the copy suggests the copy's own fields and Orders list again. A
WeKan import, and the clone that runs through it, already left it out.

The order card's labels are now in the owner's language: the server loads
the language before translating.

Thanks to xet7 !
2026-11-22 20:41:15 +02:00
Lauri Ojansivu d2b40f64df Turn off all webhooks: the server sends none and refuses to add or change one.
Admin Panel / Settings / Features gets one switch, stored as
webhooksDisabled on the Settings document and saved by the site-admin
method saveWebhooksDisabled (audited). While it is on:

- nothing is sent: board and global webhooks, two-way webhooks,
  Mattermost direct messages, the grouped and scheduled queue, durable
  Sync webhooks, the login and registration webhook and bot dispatches
  all ask webhooksOff() first (models/lib/webhooksSwitch.js SENDERS);
- adding or changing a webhook is refused: the Integrations deny rules,
  the REST POST/PUT and activities routes (403 webhooks-disabled), a
  webhook's own delivery settings and saveAccountWebhook. Each refusal
  is recorded in Admin Panel / Problems as "Webhooks turned off"
  (authz.webhooks-disabled, blocksAccount: false); a silent non-send is
  never recorded;
- nothing is deleted, so turning it off brings every webhook back.
  Removing a webhook stays allowed.

Also the site-admin method webhooksReportPage for the coming Admin Panel
/ Problems report: every integration with its board and owner, the
token reduced to whether one is set, secrets masked in the URL.

Tests: tests/webhooksSwitch.test.cjs (the queue sends nothing and keeps
what waits; every webhookFetch caller is a sender that asks or is listed
as not a webhook; every write path refuses and records; report rows
carry no token), a server mocha test, and the existing vm-driven suites
supplied with the switch, with a negative case that nothing is sent.

Thanks to xet7 !
2026-11-22 20:34:47 +02:00
Lauri Ojansivu 7f12264542 Admin Panel allowed addresses: from any other address the Admin Panel and the admin REST API refuse.
Admin Panel / Settings / Privacy and security / Allowed addresses is a list of
IPv4 and IPv6 addresses and CIDR ranges. Empty, the default, is any address.
When it is set, a site administrator at any other address reads as a member:
every admin method, publication, allow rule and admin REST endpoint refuses
them, the Admin Panel's tabs say why, and their boards keep working. Members
are not affected.

It is enforced where every admin check reads: the caller's user document,
through Meteor.users.findOneAsync (Meteor.userAsync, ReactiveCache.getUser
and the allow rules all end there). For the caller of the running DDP method,
publication or HTTP request, their own document reads isAdmin false, and a
query that asks about isAdmin answers as it would for a member. Signing in
reads the stored flag, because OIDC and LDAP write it back.

The address and range rules are the Cloud Panel's (models/lib/cloudAddresses.js),
and the address is resolved with HTTP_FORWARDED_COUNT like every other guard.
A list without the saver's own address is refused, in the page before saving
and on the server, and a browser write of the field is denied. The server's
ADMIN_PANEL_ALLOWED_IP_ADDRESSES wins over the list, and "any" lifts it: the
way back in. It is listed on every platform.

A refused admin action from another address is one row in Admin Panel /
Problems (authz.admin-panel-address), once per call, without disabling the
account.

Translations of the three new strings into every locale were written
directly; the rarer languages (for example Cherokee, Inuktitut, Tigre,
Wolaytta, Nahuatl, Veps, Klingon) are low confidence.

Thanks to xet7 !
2026-11-22 20:28:30 +02:00
Lauri Ojansivu 0d74e6ec25 Shop: tests of the products, the prices, the settings and the orders, and of what is refused.
- tests/shop.test.cjs: products from the cards and lists on sale, prices in
  minor units, categories, totals with VAT in and out of the prices, the
  stock, Budget and billing's payment methods and references, the checkout
  gate, the buyer's details, the public view that the Shop and the Website
  share - and the negatives: a price sent with the cart is not read, a card
  not for sale or sold out is refused, an unvalidated payment method or an
  Orders list on a public board is refused, a script in a card title or a
  buyer's name is escaped text, and no code but server/shop.js writes
  shopSettings.
- server/lib/tests/shop.tests.js: the methods against a database - a
  non-admin's settings refused, a guest refused unless allowed, a switched
  off payment method refused, a tampered price ignored, the order card in
  the Orders list, the stock taken, a closed shop refused.
- tests/playwright/specs/shop-view.e2e.js: an admin opens the shop, a
  product is bought, the order card is found; a public board shows a
  visitor the shop instead of the kanban.

Thanks to xet7 !
2026-11-22 19:42:41 +02:00
Lauri Ojansivu 8892734fa9 Shop: every setting is enforced on the server, and refused attempts are in Admin Panel / Problems.
server/shop.js has the three methods of the Shop:

- shopSetSettings: only an active admin of the board saves Board Settings /
  Shop; the settings are checked again (fields, lists and labels of this
  board, Budget and billing's payment methods validated, an http or https
  terms link), and the Orders list must be on a private board the same user
  administers. A client write of shopSettings is refused (Boards.deny).
- shopOrderTargets: the private boards the user administers, with their
  lists, for the Orders list.
- shopPlaceOrder: refused while Admin Panel turns the Shop view off, while
  the shop is closed, for a visitor without an account unless the shop
  allows it, for a board the caller can not read, and for a payment method
  the shop does not offer. The order is priced from the cards, never from
  the cart; a total the buyer did not see is refused as a changed price; the
  stock is taken card by card, only if it is still what was priced. The
  order is a card in the Orders list, written in the name of the admin who
  chose that list while they are still its admin, numbered per shop and
  year, with Budget and billing's payment reference and instructions.
  Rate limited per connection and per address, and to 200 orders an hour
  per shop.

Admin Panel / Problems records what no screen produces: authz.shop-settings,
authz.shop-order (and, detected, a cart line carrying a price) and
dos.shop-orders, none of which disables an account.

Thanks to xet7 !
2026-11-22 19:42:15 +02:00
Lauri Ojansivu 02baa650fe Sign-in addresses expire: LOGIN_ADDRESS_RETENTION_DAYS, default 365 days.
Where people signed in from was capped in count but kept for good, on the
account, in loginAddresses and in shortPasswordLogins. Once a day - claimed
for the whole installation - an entry last used before the cutoff is removed
from each; an address still in use keeps a recent date and stays, and 0 keeps
everything. Listed on every platform. Work package 2 of
docs/Compliance/README.md (GDPR Art. 5(1)(c) and (e), POPIA s. 14(1), PIPEDA
4.5.3, APP 11.2). tests/loginAddressRetention.test.cjs pins it.

Thanks to xet7 !
2026-11-22 19:16:44 +02:00
Lauri Ojansivu 377a7b3abc Audit log: the Admin Panel's own collection writes and user anonymisation are recorded.
Settings / Appearance, Features and the other switches the Admin Panel saves
straight from the browser go through Meteor's /<collection>/insert, /update
and /remove methods, which the audit log did not wrap, so most site changes
left no trace; anonymizeUser was not audited either. The admin-only
collections - settings, announcements, translation, accessibilitySettings,
lockoutSettings, inviteToBoardRolesSettings and attachmentStorageSettings -
and anonymizeUser are now in the trail, with the arguments redacted as every
other entry's. Work package 1 of docs/Compliance/README.md (GDPR Art. 5(2),
NIS2 Art. 21(2), ISO/IEC 27001 A.8.15). tests/adminAudit.test.cjs pins it.

Thanks to xet7 !
2026-11-22 19:14:20 +02:00
Lauri Ojansivu 4364c7d008 Fix the suites that my earlier fixes broke: the hint's tests, the calendar guard, the OIDC quirks, tag stripping.
- The permanent delete hint now says Admin Panel / Settings / Delete: the
  tests that pinned the old path say the new one, and the audited Wu,
  Corsican and Latin corrections record the change, so the repair tool keeps
  it.
- calendarBaseOptions: the board calendar's editable follows
  Utils.canModifyBoard() since the write gate.
- OAUTH2_RESPONSE_MODE and OAUTH2_CLAIMS_IN_ID_TOKEN are read as process.env
  (they are environment-only) and named as such in the login catalog test.
- The attachment search text strips tags until nothing more is removed, as
  tests/tagStrippingFixedPoint.test.cjs requires.
- Login-Problems.md links sandstorm.org (sandstormOrgHosts).

Thanks to xet7 !
2026-11-22 19:10:12 +02:00
Lauri Ojansivu f4439cb285 CLOUD on every platform, and the docs links of every docker-compose file.
CLOUD, the Cloud Admin container's domain, is listed - commented out, with
what it does - in the Dockerfile, start-wekan.sh and .bat, every
docker-compose file and the Snap (cloud=), and read as process.env.CLOUD where
tests/envVarCoverage.test.cjs sees it. The docs links fixed in
docker-compose.yml earlier are fixed in the other compose files too, which
tests/dockerComposeBackends.test.cjs keeps alike, and OAuth2.md's snap example
names a real key (docsSnapKeysExist).

Thanks to xet7 !
2026-11-22 19:05:18 +02:00
Lauri Ojansivu f6dcb7aade Mocha: the feature gate test turns the admin preview off for itself, and the REST login test reads the body as sent.
A site admin previews off features only while Admin Panel says so, and the
test database had the preview on, so the admin's call was allowed - as it
should be; the test now sets the preview off for the refusal and checks the
preview keeps the feature as the negative case. sendJsonResult writes `data`
as the body itself, so the signed-in id is json.id.

Thanks to xet7 !
2026-11-22 19:04:17 +02:00
Lauri Ojansivu 47fc873e1d Password login disabled: the login method refuses a password request before any lookup, so the answer is the same for a right and a wrong password.
The validateLoginAttempt hook refused every password sign-in, but a later
hook of the same chain - the lockout's "User not found" / "Incorrect
password" - overwrote its error for a wrong password and left it for a right
one, so while password login was off the answer still said whether a
password was right. Meteor's login method now refuses a { user, password }
request itself (loginRequestRefusal), synchronously before the original
method runs; the hook stays for resetPassword, verifyEmail and createUser.
Found by the new Playwright spec.

Thanks to xet7 !
2026-11-22 19:02:59 +02:00
Lauri Ojansivu bdaad563ac Cloud Panel: a customer signs in as username_customerdomain, so one username can be a customer at many domains.
The panel's account of a customer is named username_customerdomain - their
username in their own WeKan, an underscore, their domain - and that is the
name they sign in with: the part after the last underscore picks the domain,
and only that domain's database is asked about the username before it. A
bare username, or the customer e-mail address, still works while exactly one
domain lists it, and is refused rather than guessed when two do. An account
made with the older username-domain name takes the new one at its next login.
tests/cloudPanel.test.cjs covers the name, the separator, the domain that
does not list the username and the shared domain.

Thanks to xet7 !
2026-11-22 19:02:23 +02:00
Lauri Ojansivu ed7aa22642 REST API: none at the Cloud Panel's address for a request without a login.
At the CLOUD address there is no POST /users/login nor /users/register at
all - signed in or not, both being ways of getting a login - and no other
/api/ or /users/ request without one (models/lib/cloudPanel.js
cloudRestDecision): 404, recorded in Admin Panel / Problems as
authn.cloud-rest-off. The gate sits after the bearer token is read and in
front of every route; a request carrying its login in ?authToken= or the
login cookie, as the browser's exports do, is asked too. The inbound email
and bounce webhooks are refused there as well: the panel turns no email
into cards and sends nothing that bounces. Every other host, and every
WeKan without CLOUD, is unchanged.

tests/apiBodyParsing.test.cjs declares the pure module the middleware now
loads; tests/cloudPanel.test.cjs and tests/cloudPanelGate.test.cjs pin the
decision and its place.

Thanks to xet7 !
2026-11-22 18:50:03 +02:00
Lauri Ojansivu ac856dd38f Cloud Panel: only with the CLOUD environment variable; its Cloud Admins, customer login, support boards and allowed addresses.
CloudPanelBleed. Any site administrator of any WeKan could set the Cloud
Panel Domain and its SuperAdmin in Admin Panel / People / Cloud and then
make the server connect to any MongoDB server with credentials of their
choosing - Test connection and Import build a MongoClient from the
domain's database settings. A customer is the administrator of their own
WeKan container, so a customer could reach MongoDB servers on the internal
network.

The Cloud Panel now exists only where the server has CLOUD=<its domain>
(models/lib/cloudPanel.js cloudDomainFromEnv). The domain is never read
from the database, the browser or the REST API; the People / Cloud pane is
gone and cloudPanelGetSettings / cloudPanelSetSettings always refuse. Every
cloudPanel* method except cloudPanelWhoAmI passes the CLOUD gate before
anything else, its argument checks included, and the one MongoClient built
from data that is not the environment (withSource) has the gate in its own
body. A refusal is recorded in Admin Panel / Problems under the new keys
authz.cloud-panel-off, authz.cloud-panel-access and
authn.cloud-admin-address (bleed CloudPanelBleed; none disables an
account).

- Cloud Admins: on the CLOUD container its site administrators - the first
  registered user is one - not disabled, never a customer's account. They
  have Admin Panel / Cloud (/admin/cloud/<pane>, a tab shown only for a
  Cloud Admin at the CLOUD address): Domains, Invoices, Tickets, Chat,
  Cloudflare, Caddy, Allowed addresses. /cloud stays the customers' panel.
- Customer login: a password login handler, ahead of accounts-password's
  and after the timing normalization, only at the CLOUD address, only for a
  name exactly one domain with its own database lists, never for a name an
  account of the panel's own has. The password is checked against that
  customer's own database hash with Accounts._checkPasswordAsync, under an
  id no local account has; a disabled or password-less account there is
  refused, and so is a wrong 2FA code. On success a local non-admin account
  without a password, services.cloudCustomer, which sees exactly its own
  domain: info, invoices, tickets and chat.
- Support boards: one WeKan board per domain, "Support: <domain>", lists
  Open / In progress / Done for tickets and Chat with one card whose
  comments are the support chat (Board View / Chat shows them as a chat).
  Cloud Admins are board admins, customers Comment only: they read and
  comment but cannot create, edit, move, archive or delete a card nor
  manage the board; the panel adds their tickets into Open. The earlier
  cloudChatMessages are moved once into the chat card; imported
  Rocket.Chat and SandChat conversations go there too.
- Allowed addresses: IPv4, IPv6 and CIDR ranges (models/lib/cloudAddresses.js).
  When set, a Cloud Admin login (resume included) from elsewhere is refused
  and recorded, and so is a Cloud Admin method. A list without the saver's
  own address is refused; CLOUD_ADMIN_ANY_ADDRESS=true sets it aside for a
  locked-out operator.

Tests: tests/cloudPanel.test.cjs, tests/cloudAddresses.test.cjs,
tests/cloudPanelAccess.test.cjs (the real methods and login handler without
and with CLOUD), tests/cloudPanelGate.test.cjs (the MongoClient source scan),
server/lib/tests/cloudPanel.security.tests.js and
tests/playwright/specs/cloud-panel.e2e.js (negative without CLOUD; the
positive part runs with CLOUD=localhost WEKAN_TEST_CLOUD=true). The guards
that pin board inserts, comment inserts, card-reading paths, copy/move
methods, the Admin Panel tabs and method areas list the panel's support
board and its methods, with the reason.

Thanks to xet7 !
2026-11-22 18:49:51 +02:00
Lauri Ojansivu c5b3b597e8 Disable all import: the Trello API, iCalendar and Scrum transfer imports are refused on the server too.
"Disable all import" says the server rejects any import request, and most
import paths asked assertImportEnabled(), but trelloStartImport and
trelloResumeImport, importIcsToBoard and its REST route, and
scrum.importIntoBoard did not. They ask now, after their argument checks.

tests/importDisabledEverywhere.test.cjs holds it tree-wide: every server
method or REST route whose name says it imports asks assertImportEnabled(),
directly, through a file-local helper or by handing the request to
importBoard, or is listed with the reason it is no import of board data.

Thanks to xet7 !
2026-11-22 18:49:01 +02:00
Lauri Ojansivu 68dcfd14fe Admin Panel / Settings / Features: an unticked feature is refused on the server, not only hidden.
An unticked feature hid its menus and nothing else: the Table, Chat, Email,
Version Control and Scrum views' methods and publications still answered,
setBoardView still stored a hidden view, and a client could still turn on a
list policy, a commitment point, a WIP limit per person or a split list.

models/lib/featureServerGates.js lists, for every catalog feature, its server
paths, its write gates, or why it is display only. requireFeature /
featureAllowed (server/lib/assistGate.js) refuse with feature-disabled and
record the attempt in Admin Panel / Problems as Disabled setting; the Scrum
methods are wrapped in one place, except the ones the card details, Board
Settings and data recovery use too; Boards / Lists deny rules refuse turning
a flow policy on; setCardFlow refuses Done here while split lists is off;
setBoardView refuses a hidden view. Board Settings / Scrum settings follows the
Scrum views tick, as it opens in the Sprints view.

tests/featureServerGates.test.cjs fails when a catalog feature is undecided,
or when a method or publication of a feature file does not ask the gate.

Thanks to xet7 !
2026-11-22 18:46:33 +02:00
Lauri Ojansivu 57a24eb8ba Own account deletion and username change follow their settings on the server, and the last admin stays.
Admin Panel / People / Login / Self delete user account unticked only hid the
Delete and Anonymize buttons: removeUser and anonymizeUser on your own account
still worked, and so did DELETE /api/users/:userId for an administrator's own
id. And removeUser's self branch returned before the last-administrator
check, so the only site administrator could delete themselves.

Now every self-removal path asks models/lib/selfAccountRemoval.js: refused
while the setting is off (recorded in Admin Panel / Problems as Disabled
setting, never disabling the account), and refused for the last site
administrator (not recorded: the button is there, so it is ordinary use).

Username Change unticked: the setUsername method already refused, but the
Users allow rule still let a client write its own username directly; a
Users.deny rule now refuses that and records it.

Thanks to xet7 !
2026-11-22 18:39:49 +02:00
Lauri Ojansivu 24be123ee5 Password login disabled and forgot password disabled are refused on the server.
PASSWORD_LOGIN_ENABLED=false only hid the password form: a DDP login with a
password, or POST /users/login, still signed in with a local password. Now an
Accounts.validateLoginAttempt hook refuses every password-service sign-in
(login, resetPassword, verifyEmail, createUser) whether the password was right
or not, and POST /users/login answers 403 before it looks up any user. LDAP
keeps working: with LDAP on, a REST username goes to the directory only, and
the LDAP handler's own LDAP_LOGIN_FALLBACK stays the operator's LDAP decision.

Forgot password unticked only hid the link: Meteor's forgotPassword method
still e-mailed a reset link. It is refused now, and also while password login
is off.

The decisions are models/lib/passwordLoginPolicy.js. Each refusal shows in
Admin Panel / Problems as Password login disabled or Forgot password disabled,
without disabling the account. New page
docs/Features/Admin-Panel/Settings-Enforced-On-Server.md.

Thanks to xet7 !
2026-11-22 18:36:04 +02:00
Lauri Ojansivu 705f12e754 Calendar: a day click adds a card, and a drag moves one, only for who may write on the board.
The calendar offered both to every member, read-only ones too, and the
server refused them - recording each refusal in Admin Panel / Problems as an
attempt (DueDateBleed), which a read-only member clicking a day is not. Now
editable and selectable follow Utils.canModifyBoard(), so a refusal is again
only an attempt. tests/calendarWriteGate.test.cjs pins it.

Thanks to xet7 !
2026-11-22 18:33:14 +02:00
Lauri Ojansivu dfbd1a6d18 Sign in with Apple: response_mode=form_post, and the claims read from the ID token.
Apple has no userinfo endpoint and its access_token is opaque, and it
requires response_mode=form_post for the name and email scopes. The OIDC
login decoded the access token and sent no response mode. Now
models/lib/oidcProviderMode.js decides, from the settings: Apple's address
(or OAUTH2_CLAIMS_IN_ID_TOKEN=true) reads the claims from the ID token - also
for a setup made from the old docs with OAUTH2_ADFS_ENABLED=true - and sends
form_post (or OAUTH2_RESPONSE_MODE); every other provider is unchanged.
tests/oidcProviderMode.test.cjs pins the decisions and the wiring.

Thanks to xet7 !
2026-11-22 18:19:06 +02:00
Lauri Ojansivu b335c5df07 Attachments: a SHA-256 and plain search text for each, checked on every read, and searched by Filter, Search and Search All Boards.
Every attachment gets its SHA-256 (contentHash: value, size, time) and its
plain search text (with the time it was made) when it is added, and - for
one added before this - the first time it is read whole. Text, Markdown,
CSV, code, JSON, HTML and e-mail are read as text, PDF and Office through
the document extractor, Outlook .msg and OpenDocument from their slideshow
rows. A new attachment's "Added" card history row carries its hash, and so
do the soft delete and restore rows.

Each whole read hashes the bytes on their way out, with no second read: no
stored hash - it is stored; the same - nothing; another hash that the card
history knows - an earlier version an undo or restore brought back - a new
hash and search text are made; anything else - a warning in Admin Panel /
Problems (integrity), keeping the stored hash. A range is no evidence.

Filter's text field, the board's Search and Search All Boards find a card by
its attachments' text; each index row is checked against its live
attachment on that card, and the text is never sent to the browser.

tests/attachmentContent.test.cjs pins the decisions and the wiring;
tests/playwright/specs/attachment-content-search.e2e.js adds a file, finds
it three ways, changes it on disk (warned), reads a range (nothing) and
brings back a known version (accepted, indexed again).

Thanks to xet7 !
2026-11-22 17:37:15 +02:00
Lauri Ojansivu 9372148915 Card details window: remembers the width it is dragged to, and an admin sets the default as a percentage.
- The width the bottom corner handle drags the card to is kept per user, as
  the left menu's is: profile.cardDetailsWidth for a signed-in user, a cookie
  otherwise. Every card opens at it, within the viewport. Reset width in the
  card menu, or a double-click on the handle, forgets it.
- Admin Panel / Settings / Appearance / Card details default width: a
  percentage of the browser window, 30 to 95, at least 520px; empty is 520px.
- The card opened as a popup takes the same width; the mobile view and the
  maximized card do not.
- A resize that made the card wider ended with the mouse outside it, which
  closed the card: the resize is now a drag the close handler knows.

models/lib/cardDetailsWidth.js decides the width (tests/cardDetailsWidth.test.cjs),
client/lib/cardDetailsWidthMemory.js sets --wekan-card-details-width and
notices the drag, and tests/playwright/specs/card-details-width.e2e.js drags
the real handle in Chromium. The four new strings are in every language.
Translations with low confidence: chr, iu, kl, tlh, vo, wal, wo, zgh, nah,
tig and ve-PP; lower than usual also ay, gn, qu, ff, ee, bm, lg, fj, gv, kw,
lld, rup, szl, sah, cv, bua, ba, bo, dz, ks, se, wa, om, ak, sn, ts, tn, ss,
nd, ve, sm, to, tpi, bi, rn and wuu-Hans.

Thanks to rmb82 and xet7 !

Fixes #6939.
2026-11-22 17:22:16 +02:00
Lauri Ojansivu 81ca7b868b Security: BounceBleed - a forged bounce report no longer stops email to any address.
POST /api/inbound-email needs no secret by default, and every email it
received was first checked for being a delivery status notification: one
forged DSN naming any address became a hard bounce, which stops every email
WeKan sends there - invitations, notifications, password resets - and only an
administrator could undo it.

A bounce is now recorded only from a transport that proves who sent it: the
webhook when its secret is configured and matched, SES after its SNS
signature and topic are checked, an IMAP mailbox WeKan signs in to, and the
Sandstorm grain's own mailbox. Elsewhere it is refused with 403, makes no card
or comment, and is summarized in Admin Panel -> Problems as BounceBleed.

tests/bounceBleed.test.cjs requires every receiver to say whether it may
carry a bounce, only the trusted ones to say yes, and nothing to record a
bounce around the gate. server/lib/tests/inboundEmailRoute.tests.js posts the
advisory's forged DSN over HTTP without, with a wrong and with the secret.

GHSA-7w85-38ph-c96v, GHSA-2wcc-f289-3r95, GHSA-735h-p955-fwxp.

Thanks to crypto-nidh and xet7 !
2026-11-22 16:48:15 +02:00