Commit Graph
33 Commits
Author SHA1 Message Date
Lauri Ojansivu f3950b9adc Dependabot alerts 180 and 183-187: minimatch in the other lockfiles, and the Go modules of the embedded benchmark.
minimatch before 11.0.1 (GHSA-g3hv-75wg-m249): npm-packages/exceljs still had
10.2.6 through readdir-glob 3, and the vendored jade lockfile under
meteor-jade-loader had three copies through glob 13 and test-exclude; both get
an override to minimatch 11, as the root lockfile has. A test now reads every
package-lock.json of the repository, not only the reported ones.

The benchmark module of embedded engines pulled klauspost/compress 1.18.0,
golang.org/x/net 0.23.0 and golang/glog 1.0.0 (GHSA-259r-337f-4rfw,
GHSA-5cv4-jp36-h3mw, GHSA-qxp5-gwg8-xv66, GHSA-vvgc-356p-c3xw,
GHSA-6wxm-mpqj-6jpf). They are raised to 1.18.7, 0.62.0 and 1.2.4, and
govulncheck then found more in x/net, x/text and OpenTelemetry, which are raised
too (x/net 0.62.0, x/text 0.43.0, otel 1.42.0): it now reports none. A test
holds every go.mod of the repository at or above these floors.

Thanks to dependabot and xet7 !
2026-11-04 00:12:45 +02:00
Lauri Ojansivu 582a22c291 Fix GitHub code scanning code-quality findings.
Real faults: a card's original-position description formatted a promise
because it did not await the history; the attachment swipe distances and
two drag-scroll locals were undeclared globals; a file that cannot be read
during a GridFS upload left the upload open; api.py called exit() instead of
sys.exit(); a rules test redefined a property and a security-log test kept
an unreachable branch. Also 31 missing semicolons, unused imports in the
card details, exporters and attachment API, unused Python imports, and
comments on empty except clauses. The list-sync scanner test cut its source
at the last Meteor.startup, which the new index startup of #6855 had moved.

Thanks to GitHub CodeQL and xet7 !
2026-11-02 14:15:02 +02:00
Lauri Ojansivu 900267451c Fix CodeQL alerts 565 to 568, and the same shapes elsewhere.
Alert 565 (ReDoS): the package-specifier pattern in
releases/prune-unreachable-npm.mjs allowed `/` both between and inside path
segments, so a quoted `-/-/-/...` could be split in exponentially many ways;
es-module-lexer's minified lexer alone took over two seconds. A `/` now only
separates segments. Over the 23,812 files in node_modules it finds every
package it found before, and also `require('querystring-es3/')`, the
trailing-slash form the old pattern missed.

Alert 566 (bad tag filter): the Sandstorm readiness test matched <script>
case-sensitively. It and three negative checks that said "no <script" in
sanitized output now match any case; one of those also collected tag names
with a case-sensitive pattern that an <SCRIPT> tag would have escaped.

Alerts 567 and 568 (code sanitization): a test wrote dictionary paths into
generated JavaScript with JSON.stringify. It copies the dictionaries beside
its entry so the source is constant, and four more test probes take module
paths as arguments instead. The i18n loader the test drives, which writes an
asset name into generated server code, refuses a name outside a locale
tag's characters and escapes the literal.

tests/securityAlerts20261012.test.cjs fails on any case-sensitive script,
noscript or iframe pattern and on JSON.stringify spliced into an import,
require or asset path anywhere in the tree.

Thanks to GitHub CodeQL and xet7 !
2026-10-12 11:43:02 +03:00
Michael Nutt df1c240edd Load server translations from private assets on demand
Keep English embedded and load other server dictionaries on first use,
without changing client loading or translation contents. Include loader
regressions, build integration checks and profiling documentation.
2026-10-11 23:30:56 -04:00
Lauri Ojansivu 3eec76b366 Fork capnp-es as @wekanteam/capnp-es with complete RPC Resolve and Release.
npm capnp-es 0.0.16 (upstream commit 439f564), vendored like the other
npm-packages forks with its tarball SHA256 and npm integrity recorded. Its
experimental RPC Conn could not talk to a C++ peer such as
sandstorm-http-bridge: it ignored Resolve, Release and Disembargo, never
released an import, left tail-call answers (takeFromOtherQuestion) pending
forever, released question ids instead of export ids, answered bootstrap
with a null capability, and its DeferredTransport lost a message whenever
two arrived together. The fork handles all of them, and its compiler no
longer regenerates structs declared in another file, which made generated
Sandstorm schema modules a SyntaxError on load. Every change is in
npm-packages/capnp-es/patches/wekan.patch.

Thanks to xet7 !
2026-10-11 15:29:36 +03:00
Lauri Ojansivu 7f8627590b Updated meteor-reactive-cache 2026-10-10 01:51:54 +03:00
Lauri Ojansivu 1bdc171f0f Updated meteor-reactive-cache 2026-10-10 01:23:44 +03:00
Lauri Ojansivu 9f29a41740 Added npmjs.com @wekanteam npm packages directly to wekan repo npm-packages directory.
Thanks to xet7 !
2026-10-10 01:11:32 +03:00
Lauri Ojansivu 5ec6d9af18 Fix the code scanning and Dependabot alerts of 2026-10-10.
- Markdown links from imported files (CodeQL #555): Plane escaped [ and ]
  in a link title but not backslash, so a title ending in "\" ran on into
  the URL, and its URL went through encodeURIComponent, which leaves ( and )
  as they are, so a ")" ended the link early and the rest became a second
  link. ClickUp, Super Productivity and Vikunja wrote links the same way.
  All four now use models/lib/markdownLink.js, which escapes the title and
  percent-encodes what ends or breaks a destination.
- A replacement of a space with itself in a test (CodeQL #554), where a
  regular-expression escape was meant. tests/noIdentityReplacement.test.cjs
  now also finds the regular-expression form of an identity replacement.
- The vendored @wekanteam/exceljs (CodeQL #556-#558, Dependabot #137-#142):
  sheet names are read without a backtracking regular expression, the
  manual test pages pin their CDN script with Subresource Integrity, and
  brace-expansion is 5.0.12. Same change as the fork, .tools/exceljs
  25db789. The vendored jade's dev tools also had brace-expansion 5.0.6.

tests/securityAlerts20261010.test.cjs pins each, and the shape of each
across the tree.

Thanks to GitHub CodeQL, dependabot and xet7 !
2026-10-10 00:45:30 +03:00
Lauri Ojansivu dd6fe3ef1e Added @wekanteam/exceljs@4.7.4 to WeKan repo directly, because after publishing to npmjs.com it still is not available to be installed with npm install.
Thanks to xet7 !
2026-10-10 00:14:05 +03:00
Lauri Ojansivu f5836c3a37 Update pbkdf2 to 3.1.7 for GHSA-477h-4r7f-fvrx.
pbkdf2 <= 3.1.6 hashes an over-long password again on every iteration, so a
1 MiB password costs a full hash per round (CVE-2026-102414, denial of
service). 3.1.7 hashes it once.

meteor-node-stubs 1.2.30 bundles pbkdf2 3.1.3 inside its own tarball, where
npm overrides cannot reach it, and no meteor-node-stubs release bundles 3.1.7.
Instead of forking meteor-node-stubs again, WeKan now depends on pbkdf2
^3.1.7 directly and the new postinstall script
scripts/patch-meteor-node-stubs-pbkdf2.cjs removes the bundled copy, so
crypto-browserify resolves the patched top-level package, and drops the
bundled entries from package-lock.json. It fails the install if the patched
package is missing.

The vendored jade lockfile moves from pbkdf2 3.1.5 to 3.1.7.

tests/dependencySecurityUpdates.test.cjs fails when any tracked lockfile
holds pbkdf2 <= 3.1.6, flags a synthetic 3.1.3 bundled entry, and drives the
postinstall script against fixture trees.

Thanks to dependabot and xet7 !
2026-10-07 17:05:40 +03:00
Lauri Ojansivu 373980ac8a Restore the full-featured DOCX/XLSX/PPTX viewer and native PDF preview
The minimal server-rendered GIF-slideshow document preview (added this week
to cut dependency weight) kept failing with a bare 415 - its own
rasterization dependency chain (pdf-to-img -> pdfjs-dist's optional
@napi-rs/canvas) needed three separate fixes in a single day for a missing
package, a worker path resolved into the wrong bundle directory, and a stale
stored filename, and still left a text-only fallback as the best case for a
PDF.

Restore the previous full-featured viewer instead: office-open-xml-viewer
(MIT, canvas-based, zero runtime dependencies) renders DOCX/XLSX/PPTX
client-side, and PDF goes back to the browser's own native <embed> viewer -
simpler, zero extra dependencies, and gets the browser's own zoom/search/
print for free.

The server-side full-text search this week's change introduced is kept:
server/lib/documentGif.js now does nothing but extract plain text for the
search index (indexDocumentText, triggered in the background from
Attachments.onAfterUpload) - no rendering, no HTML, no page images - so
pdf-to-img and @napi-rs/canvas are dropped entirely (nothing rasterizes a
PDF page server-side any more) while pdfjs-dist stays, now as a direct
dependency, for its text-only extraction. Searching attachment contents from
the card search box keeps working exactly as before.

Thanks to xet7 !
2026-09-10 16:59:42 +03:00
Lauri Ojansivu 6714747d00 Removed fork of meteor-node-stubs, using npm package instead.
Thanks to xet7 !
2026-09-08 18:40:39 +03:00
Lauri Ojansivu 818b57421f Generate searchable document previews on the server 2026-09-06 18:35:33 +03:00
Lauri Ojansivu e54b123c10 Validate XLSX sheet colors before CSS serialization
Thanks to rbbjinioeq and xet7 !
2026-09-05 23:51:02 +03:00
Lauri Ojansivu 8aed6a9841 Fix CodeQL string escaping and regex alerts
Escape backslashes before quotes in OOXML CSS font families, and replace four backtracking language-registry regexes with a linear parser.\n\nThanks to GitHub CodeQL and xet7 !
2026-09-05 12:28:28 +03:00
Lauri Ojansivu b527894001 Add safe Office attachment previews 2026-09-03 02:35:23 +03:00
dependabot[bot] 2209b22b1d Bump qs
Bumps the npm_and_yarn group with 1 update in the /npm-packages/meteor-node-stubs directory: [qs](https://github.com/ljharb/qs).


Updates `qs` from 6.15.3 to 6.16.0
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.15.3...v6.16.0)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.16.0
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-02 20:55:03 +00:00
Lauri Ojansivu 9c5ff4f9f1 Updated meteor-node-stubs fork.
Thanks to xet7 !
2026-07-31 05:45:59 +03:00
Lauri Ojansivu ed19445d30 Fix #6459 #6455 #6458 #6466 #6467 #6468 #6472 #6465 #5547 #5282.
- #6459: card More menu rendered empty (no Delete): the vendored jade
  compiler's htmljs patch made isConstructedObject(Array) false, so
  'label {{_ ...}}:' lines got their content array mis-assigned as tag
  attributes and Blaze threw 'foreign objects in attributes' killing the
  whole cardMorePopup. Also fixed the list More link input (nonexistent
  rootUrl helper -> absoluteUrl).
- #6455: saving a card description never removed a pre-existing unsaved-
  edits record, and the draft/description comparison mismatched on Markdown
  hard-breaks and empty descriptions, re-creating a phantom draft on every
  save. Save now clears the draft; both sides normalized the same way.
- #5547: comment drafts: the draft-saving escape handler had been disarmed
  since 2019 (flag with no setter), so a comment being written was lost
  when the card closed. Drafts are now saved continuously (debounced),
  flushed on teardown, cleared on submit; text no longer visually vanishes
  on outside clicks.
- #5282: attachment delete: guard against the doc being already evicted
  from Minimongo ('Removed nonexistent document'), like the existing
  comment/checklist guards.
- #6472: rules move card to top/bottom: fall back to the card's current
  list when listName does not resolve (was a swallowed TypeError = rule
  silently did nothing); wizard stored listTitle which the engine never
  reads (listName); empty destination wrote sort +-Infinity; rules JSON/CSV
  import now uses the rules.createRule method instead of client inserts
  rejected into minimongo limbo, and defaults missing trigger matching
  fields to '*'; empty boardId no longer overrides the real board; the
  server-side orphaned-cards fallback in List.cards()/cardsUnfiltered()
  now actually resolves its async swimlane lookup.
- #6465: desktop density back to WeKan 6.09: base font 14px and headings
  22/18/16px (vw clamps resolved to 18/24px on desktop), All Boards
  wrapper padding 10px/15px, card details docks to the right edge instead
  of floating on top of its own card (still draggable), 20px canvas
  padding instead of ~48px white borders, removed the force-all-card-text-
  to-title-size rule, admin org/team table Select/Unselect-all header
  links are compact icons and header cells may wrap, zoom pill no longer
  cut off, one-click board settings cog in the board header.
- #6458 #6466: snap: mongodb-control now checks mongod's exit status and
  does an AVX pre-flight (MongoDB 5+ needs AVX; without it mongod SIGILLs)
  instead of pinging a dead port forever behind a 502: it switches to a
  completed FerretDB migration, or (re)runs the migration (AVX-free) with
  a 3-attempt guard. Migration importers no longer fail the whole run on
  >=10 per-item errors ('Avatars Errors' etc.), and a failed 3.x-source
  migration keeps the copied FerretDB data + checkpoint and resumes next
  start instead of deleting it and 'falling back' to a mongod 7 that
  cannot open 3.x data files.
- #6467 #6468: with FerretDB, calm Meteor's no-oplog polling storm
  (METEOR_POLLING_THROTTLE_MS=2000, METEOR_POLLING_INTERVAL_MS=30000
  defaults in the snap and bundle launcher; overridable). The FerretDB
  fork gets filter pushdown, a sane pool size and less locking in its own
  repo.
- Updated ChangeLog.

Thanks to xet7.
2026-07-16 17:08:31 +03:00
Lauri Ojansivu b4b81684e0 Fix Incomplete string escaping in jade.js.
Thanks to CodeQL !
2026-05-30 22:28:20 +03:00
Lauri Ojansivu 105199991f Fix Polynomial regex DoS in Jade parser, part 2: remove the redundant $ anchor
from the interpolation regex in `compiler.js` and bundled `jade.js`. The greedy
`[\s\S]*` already matches to end of string, so dropping `$` keeps the same match
while eliminating the backtracking that CodeQL alert `js/polynomial-redos` flagged.
Thanks to CodeQL.
2026-05-30 22:16:42 +03:00
Lauri Ojansivu ae671bc70a Fix Polynomial regex DoS in Jade parser.
Thanks to CodeQL.
2026-05-30 22:07:32 +03:00
Lauri Ojansivu 06c803388b Updated dependencies. Part 6. Fork and update meteor-node-stubs.
Thanks to developers of dependencies !
2026-05-30 20:48:43 +03:00
Lauri Ojansivu 3e33c766d6 Updated dependencies.
Thanks to developers of dependencies !
2026-05-22 18:51:02 +03:00
Lauri Ojansivu 09a5737e21 Updated dependencies. Part 2. 2026-05-13 17:05:14 +03:00
Lauri Ojansivu 7efba64c39 Updated dependencies.
Thanks to developers of dependencies !
2026-05-13 16:31:18 +03:00
Lauri Ojansivu 7584afda6d Upgraded to Meteor 3.4, Node.js 22.22, MongoDB 7.x, here related fixes.
Thanks to harryadel and xet7 !
2026-03-24 20:39:21 +02:00
Harry Adel 8ffc0cb5ff Centralize client boot and rspack package loading 2026-03-24 01:50:25 +02:00
Lauri Ojansivu 8816c886cf Moved meteor-reactive-cache to npmjs.com @wekanteam/meteor-reactive-cache https://github.com/wekan/meteor-reactive-cache.
Thanks to xet7 !

Related https://github.com/wekan/wekan/pull/6139
2026-02-19 23:05:15 +02:00
Harry Adel f40a00ef0e Update lock files 2026-02-19 00:34:15 +02:00
Harry Adel f934aea2a5 Return data on client (sync) and Promise on server (async) naturally, without wrapping in an extra Promise 2026-02-18 18:24:55 +02:00
Harry Adel e241e27ca1 Add local fork of meteor-reactive-cache package
- Clone @wekanteam/meteor-reactive-cache to npm-packages/
- Add .meteorignore to exclude npm-packages from Meteor
- Update package.json to use local file path

This allows direct modification of the package for Meteor 3.0
async migration while maintaining publishability to npm.
2026-01-31 20:46:05 +02:00