Commit Graph
8 Commits
Author SHA1 Message Date
Lauri Ojansivu be6727607c CrossBoardExportBleed: a checklist scope stays on its board, and every export obeys Disable all export and Anonymize export users.
GHSA-8885-xrq4-j47h, reported by ccsimplyspolit, both findings confirmed
in the current code:

1. GET /api/boards/<board>/export?checklistId=<id> (and exportZip)
   selected the scoped checklist and its items by id alone. A checklist
   of another board - a private one too - was streamed with every item
   and its creator, whose profile the anonymization map did not cover.
   Both selectors are now bound to the exported board's cards, and a
   checklist of another board is recorded in Admin Panel / Problems
   (authz.export-checklist-scope).

2. The streaming CSV/TSV export asked neither Disable all export nor
   Anonymize export users. Neither did, it turned out, Excel (board,
   card, all boards), PDF (board and card), the chart exports, the
   calendar feed or the external formats: only the WeKan JSON, ZIP and
   Trello exports did, though the setting promises that "the server
   rejects any export request" and names CSV and Excel.
   - refuseDisabledExport() answers 403 before anything is written, and
     all 13 HTTP export routes call it first; assertExportEnabled() still
     guards the builders. Both record the attempt (authz.export-disabled,
     never blocking the account: a page opened before the switch still
     shows the menus).
   - anonymizeExportIdentities() anonymizes what one exporter writes -
     users, @mentions, requested-by / assigned-by, comments - with the map
     build() uses, board members included. The CSV/TSV stream, Excel,
     PDF, chart exports (forExport: the chart views keep names), the
     calendar feed and every external format call it.

tests/crossBoardExportBleed.test.cjs drives the gate and the anonymizer
and scans the tree: no scoped checklist selected by id alone, no export
route without the gate, no exporter naming people without anonymizing.
All 7 fail on the code before. The new spec
security-cross-board-export.e2e.js replays the reporter's requests and
checks every export route while export is disabled and the CSV and
Kanboard exports while anonymizing; it passes with export-access and
scrum-export-anonymization against a rebuilt bundle.

Thanks to ccsimplyspolit and xet7 !
2026-11-01 14:00:19 +02:00
Lauri Ojansivu 89a65ee7ce Enforce admin-only custom fields across server boundaries
Fix AdminFieldBleed (GHSA-m8gh-2h78-f57x): redact protected values from publications, API responses, method results, History and analytics; constrain value searches and refresh live permissions.

Guard inserts, full-array modifiers, copying and shared definitions at the request write boundary. Require authorized exports and summarize explicit attacks in Admin Panel Problems. Add positive, negative and Chromium regression coverage.

Thanks to Hama1cco and xet7 !
2026-09-28 21:46:56 +03:00
Lauri Ojansivu 15ff19d2a8 Export scoped daily Scrum observations to Excel and PDF
Share the bounded history reader with report downloads. Preserve exact UTC capture times, estimate policies, unknown counts and partial or truncated result notices. Verify real workbooks and extracted PDF text through the application.

Thanks to xet7 !
2026-09-27 22:27:51 +03:00
Lauri Ojansivu 0c862047b5 Prevent assigned-only members from exporting unfiltered board data
Share authorization across all nine exporters and retain access only for already scoped Scrum reports. Return HTTP 403 for denied document exports. Document ExportScopeBleed and cover policy, source-wide guards and HTTP behavior.

Thanks to xet7 !
2026-09-27 18:21:58 +03:00
Lauri Ojansivu 83eac10211 Add Scrum sprint planning, optional metadata and snapshot reports
Reuse board permissions, card estimates and chart exports for Product Backlog, Sprints, Sprint Report and Velocity views. Add revision-checked sprint lifecycle, recoverable rollover, release/event creation and independently hidden metadata controls. Explicitly label assigned-only reports as partial.

Verified 12 focused Node checks, a real Meteor/Mongo lifecycle regression and three Chromium scenarios including settings visibility, denial paths and actual Excel/PDF files. History integration, full transfer mappings and further report/editor work remain tracked in the Scrum design.

Thanks to xet7 !
2026-09-27 17:33:38 +03:00
Lauri Ojansivu 0b411b5476 Add flow analytics charts and reversible dependency history
Reuse board dates, activities, estimates, dependencies and universal History for Aging WIP, Blocker Analysis, Monte Carlo forecasts, XmR and size versus cycle time. Keep Chart.js lazy loaded and share parameterized PDF/Excel exports. Record dependency edits in History with undo/redo and board-boundary validation.

Validation: 21 focused Node suites and 8 Chromium tests pass, including every chart download and dependency undo/redo. Report labels reuse native locale vocabulary and formula notation; compact explanatory wording outside English/Finnish has low confidence and welcomes review.

Thanks to sojournerc and xet7 !

Fixes #1476,
2026-09-26 22:40:39 +03:00
Lauri Ojansivu 278db0ada3 Write dates as real date cells in every Excel export.
Reported directly, with a LibreOffice screenshot: the Frappe Gantt view's
Excel export showed Start/Due/End as ISO text ("2026-09-23T09:00:00.000Z").
ExporterChartExcel wrote cell.toISOString() into the cell. A date is now a
real date cell with a date number format (yyyy-mm-dd hh:mm), so the
spreadsheet shows it in its own date format, sorts it as a date and can do
arithmetic on it; the "-" placeholder for an unset date stays text. Every
chart export (Gantt, Time, the report charts) shares this exporter.

The follow-up ask - every other Excel export too:
- The board and card Excel exports draw the shared card document
  (models/lib/cardDocument.js), whose meta pairs were pre-formatted text
  (fmtDate), so Created/Received/Start/Due/End/Last activity were text
  there as well. A date pair now carries the raw Date as a third element
  ([label, text, Date]); renderCardDocumentExcel writes that as a date cell
  and the PDF keeps printing the text. ExporterExcelBoard's own
  Created/Modified lines get the same treatment.
- The legacy whole-board Excel export (ExporterExcel.js) already wrote Date
  values into numFmt columns; nothing to change, pinned as such.

tests/chartExcelDateCells.test.cjs drives the chart row-writing branch
against a stand-in worksheet and pins the other exporters' shapes;
tests/pdfExport.test.cjs updated for add()'s third argument.

Thanks to xet7 !
2026-09-11 10:49:27 +03:00
Lauri Ojansivu 3abc1078c2 Implement the 10 board report charts and Gantt/chart PDF+Excel export.
The Board View menu's Dashboard, Burndown, Burnup, Cumulative Flow, Control
Chart, Lead/Cycle Time, Flow Efficiency, Throughput Histogram and WIP Run
entries opened a plain "not implemented yet" page. Each now computes and
renders its chart from this board's own Cards/Lists/Activities, per
docs/Features/Reports/charts.tsv's calculation descriptions - plain HTML/CSS
bars and a data table, no new charting dependency.

Every chart page, and the Gantt view, gets "Export to PDF" / "Export to
Excel" buttons that reuse the existing card/board export renderers
(pdfDocument's line/bar builder, createWorkbook's Excel styling) through the
same public-board / authToken / logged-in-user auth gate every other export
route already uses.

Completion date is card.endAt || card.archivedAt (WeKan has no dedicated
"Done" list flag); WIP Run's limit line only draws when a list's own WIP
limit is enabled (no invented board-level schema); Flow Efficiency's
"active" time is card.spentTime (WeKan does not track per-list queue time).
Each deviation from charts.tsv is documented where the calculation is.

models/lib/chartCalculations.js (20 tests), models/lib/chartExportRows.js
(8 tests) and the export routes' auth shape (10 tests) are covered by
tests/chartCalculations.test.cjs, tests/chartExportRows.test.cjs and
tests/chartExportRoutesAuth.test.cjs; tests/boardViewMenu.test.cjs is
updated for the now-real views. Not verified here: actual Blaze rendering
and generated PDF/XLSX bytes (no browser/Meteor runtime in this
environment) - matched syntactically against statsView/timeView and the
existing exporters.
2026-09-10 15:04:05 +03:00