Commit Graph
114 Commits
Author SHA1 Message Date
Lauri Ojansivu 3b1c7ce7bb WeKan and Trello .zip imports use the shared upload, limit and disk check; .mbox and .enex export a page at a time.
The WeKan .zip route and the Trello package route wrote their uploads
with caps of their own (5 GB and 200 MB, 1 GB unpacked). They now go
through the same receiver as every Import page upload: the Admin Panel's
largest import (else WEKAN_IMPORT_ZIP_MAX_BYTES for the WeKan zip), or
with none the free disk space, checked before and while the file is
written, and a Trello package may unpack to as much as that.

The .mbox and .enex exports are written to the response 500 cards at a
time, waiting for the socket when it is full, instead of being built
whole in memory; the pages together are the same file. TODO.md keeps
what is left: streamed reading of large JSON and text, and the other
formats' exports.

Thanks to xet7 !
2026-11-20 06:10:37 +02:00
Ahmed Lukman 4762bed8c1 Honor field selections in public CSV and TSV exports
Share validated export options between public and private CSV routes. Add handler regressions and live export-menu coverage for comma, semicolon and tab delimiters, default columns and private-board access.
2026-11-06 12:20:48 +03: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 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 7858d84e12 Import and export many boards at once for every format, and document each format in its own directory.
Import many boards: on the import page of every source, several export
files, or one .zip holding them, each become their own board through the
same path a single import of that file takes, and the page lists what each
file became (models/lib/importManyFiles.js). A .zip that is itself one
export (Vikunja, Notion, Plane, WeKan with attachments) stays one board.
One board per project: for the generalized importer, each swimlane the
import would make - a project, folder or list of the tool - becomes its own
board (models/lib/importSplit.js), so an export of a whole app imports as
many boards, as a Trello .zip does. Kanri's all-data export now reads every
board, not only the first, so it splits into one board per Kanri board.

Export all boards: All Boards sidebar, or Multi-Selection for the selected
boards, downloads every board the user may export in one format, each
checked as its own export is. Excel is one workbook with a sheet per board,
named after the board; every other format is a .zip with one file per board
(server/routes/exportAllBoards.js). The per-format bytes are made in one
place, server/lib/renderExternalExport.js, for the board route and this.

A WeKan .zip export imports as a new board from All Boards, unpacked on the
server with its attachments (it was refused in the browser). api.py gains
importboardsfrom and exportallboards, sends every source in the shape the
import page sends, and fetches Excel, PDF, CSV and TSV exports from their
own routes and writes them as bytes.

Fixed while documenting: a Trello Butler rule's list name kept its case,
so the rule fires; the HTML export fetches the board JSON by URL instead of
a link the export popup no longer has; Tasks.org exports time spent;
Nextcloud Deck's done flag marks the due date done.

docs/Features/ImportExport has a directory per format with the steps to
import and export it, one board and many, and its details, moved from
Format-Coverage.md, which is now the index and the shared contract.
tests/importExportDocsCoverage.test.cjs fails when a format has no page.

Thanks to xet7 !
2026-10-09 10:33:37 +03:00
Lauri Ojansivu b7d3274780 Import and export boards as Notion Markdown & CSV exports.
Notion's Markdown & CSV export is read as the downloaded .zip (opened on the
server under size limits) or as one database CSV: database properties map to
lists, people, dates, tags and custom fields, and page Markdown becomes the
card description. Export writes a database CSV that Notion's CSV import
reads, and which imports back.

Thanks to xet7 !
2026-10-08 22:01:22 +03:00
Lauri Ojansivu 6c9ffd63d4 Import and export boards as Redmine issue CSV.
Redmine's issue list "Also available in: CSV" export is read by its English
column names: each status becomes a list, issues become cards with the
tracker as a label, assignee, author, dates, parent task and related issues,
and priority, category, target version, estimated time, % Done and custom
fields become custom fields. Export writes the same CSV, which imports back.

Thanks to xet7 !
2026-10-08 21:55:27 +03:00
Lauri Ojansivu edb808e266 Import and export boards as Businessmap (Kanbanize) Excel workbooks.
Businessmap's Advanced Search "Configure results" Excel download is read by
its English column names: Column becomes lists and Lane swimlanes, owners,
tags, color, dates, comments and parent links keep their places, and
Priority, Size, Type and other columns become custom fields. Export writes
the same workbook, which imports back.

Thanks to xet7 !
2026-10-08 21:49:11 +03:00
Lauri Ojansivu 7aa90f7a00 Import and export boards as Teamwork.com Excel task import templates.
Teamwork.com imports tasks into a project from an Excel template (List or
Table view > ... > Import Tasks) whose help article names ten columns:
Tasklist, Task, Description, Assign to, Start date, Due date, Priority,
Estimated time, Tags and Status. Teamwork documents no export in that
layout, so the template is what is read and written. Task lists become
lists and tasks cards; a "-", "#" or ">" before a task name, doubled per
level, makes it a subtask card of the nearest shallower task above, in
its parent's list. Comma-separated Assign to e-mails become the owner and
assignees, Start and Due date the start and due dates (date cells, ISO,
or the site's numeric format with day/month order decided for the whole
file), Tags labels, Priority low/medium/high and Estimated time (25,
01:30, 1h 15m, 1h, 2 hours) the custom fields Priority and Estimated time
(hours), and Status Complete the checkbox field Complete with the due
date marked done. Other columns, unknown values, unreadable dates and
estimates, nameless rows and subtasks without or skipping a parent level
are reported; an .xls file is refused with a request to save it as .xlsx.
Export writes the template with date cells, HH:MM estimates and subtasks
after their parents.

tests/teamworkFormat.test.cjs builds the template with ExcelJS and covers
the subtask levels, every estimate form, the negatives and the round
trip; a Playwright case imports a workbook through the page. New
instruction text is in English, pending Transifex.

Thanks to xet7 !
2026-10-08 21:40:19 +03:00
Lauri Ojansivu 063365e8b9 Import and export boards as Wrike Excel workbooks.
Wrike documents the columns of its Excel import, not of its export: the
help article's key, parent task, title, status, priority, assigned to,
start date, duration, end date, depends on, start date constraint and
description, custom fields to the right of description, and the official
sample excel_import_sample.xls, whose folders and projects are rows with
a path as their Title (/Folder 2/Subfolder 1/) above their tasks. WeKan
reads and writes that template, headers matched case-insensitively.
Folder rows become swimlanes, Status the lists (a custom workflow's
Custom Status wins over its group), Key the reference, Parent Task the
parent card (a folder's Key puts the task in that folder), Assigned To
"Name <email>" the owner and assignees, Start and End Date the start and
due dates, Depends On "13FS" an is-blocked-by dependency, and Priority,
Duration and every other column custom fields. A start date constraint,
a folder or project's own status and dates, the workflow columns, the
SS/FF/SF kind of a dependency, bad keys and dates, and the repeated rows
of a task in several folders are reported. Export writes the template on
a Tasks sheet with a folder row per swimlane, sequential Keys, date cells,
the Wrike status group as Status and the list as the custom field WeKan
list, which the import reads back.

tests/wrikeFormat.test.cjs builds the sample's structure with ExcelJS
and covers the negatives and the round trip; a Playwright case imports a
template through the page. New instruction text is in English, pending
Transifex.

Thanks to xet7 !
2026-10-08 21:38:34 +03:00
Lauri Ojansivu 979edf4c3b Import and export boards as Quire CSV.
Quire's Import CSV reads Name, Assignee, Tag, Start, Due, Priority,
Status, Description, Parent and ID, matched by header name in any order;
its Export CSV, as the sample file its guide links and its API's
export-csv example show, also writes Started, Completed, Duration,
Estimate, Time log, Variation, Successors, Created and Created by. A
header with several values is repeated, or with merge joined by ", ".
The hierarchy is read in all three ways Quire writes it: a Parent column,
repeated ID columns by depth, and an ID path such as "#6, #8". Statuses
become lists and tasks cards with the ID as reference and the parent
task as parent card, Assignee as owner and assignees, Tag as labels,
Start (or Started), Due, Completed and Created as dates, Created by as
Requested by, and Priority (Low, High, Urgent, or the API's -1 to 2) as
a custom field; Medium is Quire's default and is left out. Dates are
read as Quire writes them, "Jun 2, 2026", or ISO 8601, and a leading '
before formula-like text is removed. Duration, Estimate, Time log,
Variation, Successors, unknown priorities and unreadable dates are
reported. Export writes the import columns with Completed, Created and
Created by, cards numbered #1... with Parent, and repeated Assignee and
Tag columns.

tests/quireCsv.test.cjs covers the sample file, the API's example, the
import shape, the negatives and the round trip; a Playwright case
imports through the page and the export audit fetches the format. New
instruction text is in English, pending Transifex.

Thanks to xet7 !
2026-10-08 21:35:31 +03:00
Lauri Ojansivu a8e73adf48 Import and export boards as Vikunja data exports.
Vikunja's Settings > Data Export writes, and its Vikunja Export migrator
reads, a zip with data.json (an array of projects with their tasks, views,
buckets, task_buckets and positions), filters.json, VERSION and
files/<id>. Both layouts are read: project views with buckets per view
(0.24 and newer) and bucket_id / is_done_bucket (0.21-0.23); a VERSION
older than 0.20.1 is refused, as Vikunja refuses it. The first kanban
view's buckets become lists and tasks cards in that view's order, several
projects swimlanes under their parent's name, with labels, assignees as
owner and assignees, created_by as Requested by, the dates (Go's zero time
is no date), the HTML description and comments as text, TipTap task lists
as checklists, hex color as card color, priority, percent done and done as
custom fields, subtask/parenttask as parent cards and blocking, related
and duplicate links as dependencies. Attachments, reminders, repeats,
other relation kinds, label and project colors, WIP limits, backgrounds,
reactions and saved filters are reported. The zip is uploaded, or its
data.json chosen or pasted, and opened on the server under size, entry
and inflate limits. Export writes the same zip, with a list called Done
as the done bucket and several swimlanes as child projects.

tests/vikunjaFormat.test.cjs covers both layouts, the round trip through
the zip and the negatives; Playwright cases import a zip and a pasted
data.json through the page and download the export. New instruction text
is in English, pending Transifex.

Thanks to xet7 !
2026-10-08 21:20:06 +03:00
Lauri Ojansivu bd6a8ce019 Import and export boards as Taiga project dumps.
Taiga's Admin > Project > Export writes, and its load_dump importer reads,
one JSON object: the whole project, with people as emails and statuses,
swimlanes, sprints and roles by name. User story statuses become lists,
Taiga swimlanes swimlanes, and user stories cards in kanban order with
their tags, assignees, owner as Requested by, watchers, dates and comments
from the history entries. Tasks become subtask cards of their story with
their own status, people, dates and comments; epics and issues get
swimlanes of their own, an epic is the parent of its first story and an
issue's type, priority and severity become labels. Custom attributes,
story points (the Scrum estimate), blocked notes and requirements become
custom fields, tag colors the nearest label colors, open milestones Scrum
sprints with the backlog order as rank. Attachments (the page leaves the
embedded files out before sending), the wiki, the timeline, votes, WIP
limits, memberships and closed sprints are reported. A .json.gz dump is
unpacked first. Export writes every key Taiga's exporter writes, with
subtasks as tasks, a story's checklist items as tasks and sprints with
both dates as milestones.

Imported labels take a board-level label_colors map as well as a tag's
own color.

tests/taigaFormat.test.cjs covers the mapping, the negatives, that every
name the dump refers to exists, and round trips both ways, on a fixture
written from taiga-back's export serializers. Playwright cases import a
dump through the page, reject a malformed one, and the export audit
fetches the new format. New instruction text is in English, pending
Transifex.

Thanks to xet7 !
2026-10-08 21:17:07 +03:00
Lauri Ojansivu b7e515dba6 Import and export boards as Super Productivity backups.
Super Productivity's Export Data writes sp-backup_*.json: {timestamp,
lastUpdate, crossModelVersion, data}, with project, task, tag, note, boards
and archiveYoung/archiveOld as {ids, entities} entity states. Projects become
swimlanes, so none is dropped; the board takes the title of the only one.
Its boards are saved filters, not containers, so lists follow its default
Kanban board: done tasks in Done, the KANBAN_IN_PROGRESS tag in In Progress,
a project's backlog in Backlog, the rest in To Do. Tasks become cards and
sub-tasks sub-task cards, tags labels, notes and web link attachments the
description, the scheduled day or time the due date (the start date when a
deadline is the due date), doneOn the end date, timeSpent spent hours,
timeEstimate and priority custom fields, and archived tasks archived cards.
Repeat configurations, reminders, issue links, project notes, local
attachments, the per-day time breakdown and the saved boards are reported;
pre-v14 backups are refused.

Export writes a backup Import from File accepts at crossModelVersion 4.5:
project, task, tag, note, boards and both archives, leaving the slices the
app fills with defaults out. Swimlanes become projects, lists one board of
panels with other lists as tags, checklists markdown task lists in the
notes, and spent hours are booked on the card's end or creation day.

tests/superProductivityFormat.test.cjs checks the mapping, the negatives,
the round trip and the export against Super Productivity's own field and
cross-model validation; a Playwright case imports through the page and the
export audit fetches the format. New instruction text is in English,
pending Transifex.

Thanks to xet7 !
2026-10-08 21:14:58 +03:00
Lauri Ojansivu 1ceaad80f4 Import and export boards as monday.com Excel workbooks.
monday's "Export board to Excel" is documented only through its help
article's screenshots and cannot be changed: the board's name in row 1,
then per group its name, a header row starting Name with the board's
own column titles, the items and a summary row; with "+ updates" a
<board>-updates sheet of Item ID, Item Name, User, Created At and Update
Content. Column titles are the board owner's, so they are matched by
meaning: Name is the title, Status the list (groups become swimlanes;
without a Status column the groups are the lists), Person / People /
Owner / Assignee the owner and assignees, Date / Due date / Deadline the
due date, Timeline the start and due dates, Tags labels, Item ID the
reference, Long text / Description / Notes the description, and every
other column a custom field. Updates become comments on the item they
name. Subitems are undocumented; as community reports show them - a
Subitems header row after the parent, its rows indented one column -
they become subtasks. Bad dates, nameless items and updates for unknown
items are reported. Export writes the flat table monday's own Excel
import reads: the first sheet, a header row and ISO dates.

tests/mondayFormat.test.cjs builds the documented layout with ExcelJS,
including updates and subitems, and covers the negatives and the round
trip; a Playwright case imports a workbook through the page. New
instruction text is in English, pending Transifex.

Thanks to xet7 !
2026-10-08 21:13:39 +03:00
Lauri Ojansivu 2e5fd9530e Import and export boards as Pivotal Tracker stories CSV.
Pivotal Tracker shut down on 2025-04-30; its stories CSV exports remain.
Columns are matched by name and repeated ones (Owned By, Blocker/Blocker
Status, Comment, Task/Task Status, Pull Request, Git Branch) collected in
order, so exports from before about 2018, which have no Priority, read
too. Current State becomes lists in Tracker's workflow order (unscheduled
to rejected), Type and Labels labels, Id the source reference, Owned By
the owner and assignees, Requested By Requested by, Created at / Accepted
at / Deadline the created, end and due dates ("Nov 22, 2014" or
11/22/2014), Estimate the Story points field and Scrum estimate, Priority
a custom field, each Iteration with its dates a Scrum sprint (one holding
only accepted stories is finished and reported), comments keep the author
and date of their "(Author - Mon D, YYYY)" tail, Task pairs a Tasks
checklist with done items, and an unresolved "#id" blocker an
is-blocked-by dependency. Pull requests, git branches, other blockers and
unknown states, types, priorities and dates are reported. Export writes
the columns Tracker's import reads, without Id, Iteration and URL.

Todoist's RFC 4180 reader is shared. tests/pivotalCsv.test.cjs runs a
2023 and a pre-2018 export, the Scrum planning, the negatives and the
round trip; a Playwright case imports through the page and the export
audit fetches the format. New instruction text is in English, pending
Transifex.

Thanks to xet7 !
2026-10-08 21:09:53 +03:00
Lauri Ojansivu eec53eb322 Import and export boards as Kanri JSON.
Kanri's Import & Export page writes, and its Import from Kanri reads, one
board (Partial Export: id, title, columns of cards, background, globalTags)
or all data (Full Export: the app settings and every board). Columns
become lists, cards become cards with their description, due date and
due-date-done flag and the card id as source reference, a card's tasks a
Tasks checklist, tags labels with their colors, and Kanri's card colors
WeKan's (teal and custom colors as hex). One import makes one board, so
from all data the first board is imported and the others are reported, as
are the background image, the countdown due date display, tags no card
uses and colors that are not colors. Imported labels now keep a source's
label color, and the collected export carries the card color and due-date
done. Export writes a single-board file Kanri's Partial import accepts.

tests/kanriFormat.test.cjs covers the mapping, all-data files, the round
trip and the negatives; Playwright cases import a board and an all-data
file through the page, and the export audit fetches the new format. New
instruction text is in English, pending Transifex.

Thanks to xet7 !
2026-10-08 21:08:40 +03:00
Lauri Ojansivu 2725f7a2aa Import and export boards as Nullboard .nbx files.
Nullboard's "Export this board..." writes plain JSON despite the .nbx
extension: one board {format, id, revision, title, lists: [{title,
notes: [{text, raw, min}]}]}, or an array of them for "Export all
boards". Every board is checked as Nullboard's own checkImport checks
it - the five keys, a non-empty id and revision, a lists array and
format 20190412 - and anything else is refused. Lists become lists and
notes cards; a note is free text, so its first non-blank line is the
card title and the rest the description. A raw note, drawn as a
heading in the list, gets the label raw; collapsed notes, empty notes,
repeated list titles and every board after the first in an array are
reported. Export writes one board Nullboard imports, with the title and
description as the note text, checklists after them as [ ] / [x] lines
and a card labelled raw as a raw note; Nullboard notes are text only,
so other labels, dates, people and comments are not written.

tests/nullboardFormat.test.cjs runs a welcome-board shaped sample, the
negatives and a round trip through Nullboard's checkImport; a
Playwright case imports through the page and the export audit fetches
the format. New instruction text is in English, pending Transifex.

Thanks to xet7 !
2026-10-08 21:07:01 +03:00
Lauri Ojansivu 1e7911a2d0 Import and export boards as ClickUp task CSV.
ClickUp documents two CSV shapes, both read by header name: the
workspace export (Task ID, Task Link, Task Type, Task Custom ID, Task
Name, Task Content, Status, each date as Unix milliseconds and as text,
Parent ID, Subtask IDs, Attachments, Assignees, Tags, Priority, List
Name, Folder Name/Path, Space Name, the time columns, Checklists and
Comments) and the Spreadsheets importer's columns (Priority 1-4,
Description content, List, Task assignee, Checklist, Time Estimate).
Statuses become lists, ClickUp lists swimlanes, the Space the board
title. Tasks become cards with Parent ID or the parent's Subtask IDs as
subtasks, Task Content as description with its attachments as links,
the [A,B] assignees and tags, the created, due and start dates (the
millisecond column, or ISO 8601), Time Spent as spent hours, and
Priority, Task Type, Custom ID, Folder and Time Estimate as custom
fields; the importer's Checklist becomes a checklist. The export's
Checklists and Comments cells have no documented format and are
reported, as are other dates. Export writes the workspace export
columns, plus the importer's Checklist column, which ClickUp maps by
name.

tests/clickupCsv.test.cjs covers both shapes, ClickUp's own importer
example, the negatives and the round trip; a Playwright case imports
through the page and the export audit fetches the format. New
instruction text is in English, pending Transifex.

Thanks to xet7 !
2026-10-08 21:04:38 +03:00
Lauri Ojansivu 46f026ddb6 Import and export boards as TickTick backup CSV.
TickTick's Generate backup writes, and Import backup reads, a CSV that
starts with a quoted Date / Version / Status preamble, then Folder Name,
List Name, Title, Kind, Tags, Content, Is Check list, the start and due
dates, Reminder, Repeat, Priority, Status, the created and completed
times, Order, Timezone, Is All Day, Is Floating, Column Name, Column
Order, View Mode, taskId and parentId, and since version 7.2 projectKind.
TickTick publishes no specification; this follows real 7.1 and 7.2
backups, as Vikunja's TickTick migrator reads them. The header is found
by its first cell and columns are read by name.

Each TickTick list becomes a swimlane and its kanban columns lists.
Tasks become cards with Content as description and its ▫ / ▪ lines as
the checklist, tags as labels, and the start, due, created and completed
dates; an all-day start or due date is the calendar day in the task's
Timezone, so it does not move. Status 1 is completed, 2 archived and -1
the label won't do; Priority 1/3/5 and Folder Name are custom fields;
taskId and parentId make subtasks. Reminders, repeat rules and unknown
codes are reported. Export writes a 7.2 backup for one TickTick list.

tests/ticktickCsv.test.cjs covers 7.1 and 7.2 backups, time zones, the
negatives and the round trip; a Playwright case imports through the page
and the export audit fetches the format. New instruction text is in
English, pending Transifex.

Thanks to xet7 !
2026-10-08 21:02:01 +03:00
Lauri Ojansivu fb7cbc66e6 Import and export boards as Linear CSV.
Linear exports issues as CSV - the workspace export or a view's - with
ID, Team, Title, Description, Status, Estimate, Priority, Project,
Creator, Assignee, Labels, Cycle, the created, started, completed,
canceled and archived dates, Due Date and Parent issue, plus columns it
has added over time; they are matched by header name. Values are read as
Linear's own open-source CSV importer reads them: priority names, labels
joined by ", ", and a leading ' before text a spreadsheet could take for
a formula, which is removed. Statuses become lists and teams swimlanes;
issues become cards with the ID as reference and Parent issue as the
parent card, Assignee as owner, Creator as Requested by, the labels and
dates, Archived as an archived card, and Priority, Estimate, Project,
Cycle and Canceled as custom fields. Updated, Triaged, cycle dates,
Initiatives, milestones, SLA Status, non-ISO dates and unknown priorities
are reported. Export writes Linear's columns in its order, with the same
formula guard.

tests/linearCsv.test.cjs covers the mapping, the parent link, the
negatives and the round trip; a Playwright case imports through the page
and the export audit fetches the format. New instruction text is in
English, pending Transifex.

Thanks to xet7 !
2026-10-08 20:59:26 +03:00
Lauri Ojansivu 435461f939 Import and export boards as Obsidian Kanban plugin files.
The plugin keeps a board in one Markdown file, and the generic Markdown
import read it only partly: the frontmatter and settings footer were
reported as unknown lines, #tags and @{dates} stayed in titles, and the
Complete lanes and the Archive were lost. This follows the plugin's own
parser and writer: kanban-plugin: board frontmatter (basic accepted),
## Lane (limit) headings, **Complete** lanes, - [ ] cards with 4-space or
tab continuation lines, *** and ## Archive, and the %% kanban:settings %%
JSON footer, whose date-format, date-trigger and time-trigger are used.
Lanes become lists with the card limit as WIP limit; #tags labels;
@{date} @@{time} the due date; the Tasks plugin's dates (due, start,
created, done, scheduled) and priority emoji the dates and a Priority
custom field; its id and depends-on the reference and blocked-by links;
Dataview key:: value fields custom fields; task lines in a card's body
its checklist; [x] and Complete lanes the done label, as the Markdown
import does; the Archive archived cards. Recurrence, cancelled dates and
other frontmatter keys are reported. Export writes the plugin's layout.

Imported columns now carry a WIP limit: KanboardCreator turns a column's
wip_limit, or Kanboard's own task_limit, which it dropped until now, into
the list's limit.

tests/obsidianKanban.test.cjs covers the plugin's sample layout, custom
date formats, the negatives and the round trip; a Playwright case imports
through the page and the export audit fetches the format. New instruction
text is in English, pending Transifex.

Thanks to xet7 !
2026-10-08 20:57:08 +03:00
Lauri Ojansivu 804c7183a2 Import and export boards as MeisterTask project CSV.
MeisterTask reads one CSV shape and writes another; both are matched by
header name. Its import shape, from MeisterTask's own sample file, is
project,section,name,notes,due_date,status,tags; its export header is
id,token,name,notes,created_at,updated_at,status,due_date,
status_updated_at,assignee,section,tags. Sections become lists and tasks
cards, with notes as description, "; "-separated tags as labels, the
assignee as owner, due and created dates in ISO 8601, status 2 as
completed with status_updated_at (or completed_at) as the end date, and
status 8 or 16 (binned, archived) as archived cards. Columns MeisterTask
documents no shape for - checklists, comments, custom fields, tracked
time - unknown status codes and non-ISO dates are reported. Export writes
the import shape, which MeisterTask reads back.

Todoist's RFC 4180 reader is shared and names the format in its errors.
tests/meistertaskCsv.test.cjs runs MeisterTask's published sample, the
export header, the negatives and the round trip; a Playwright case
imports through the page and the export audit fetches the format. New
instruction text is in English, pending Transifex.

Thanks to xet7 !
2026-10-08 20:52:04 +03:00
Lauri Ojansivu 7ef5b875fa Import and export boards as Microsoft Planner Excel workbooks.
Planner's "Export plan to Excel" writes one sheet, Tasks: plan name, plan
ID and export date on rows 1-3, then Task ID, Task Name, Bucket Name,
Progress, Priority, Assigned To, Created By, the created, start, due and
completed dates, Late, Completed By, Description, Completed Checklist
Items, Checklist Items and Labels. Columns are matched by name, as newer
exports add Is Recurring. Buckets become lists and tasks cards, with the
Task ID as source reference, the ;-separated assignees as owner and
assignees, Created By as Requested by, the checklist and labels, and
Progress, Priority and Completed By as custom fields. Dates are text in
the exporting user's locale: day/month order is decided for the whole
file, and reported when every date could be read either way; date cells
keep their day. Which checklist items were done (Planner exports only a
count), a recurring task's repeat and unknown values are reported.
Export writes the same workbook as .xlsx.

The layout follows a real Planner export, the MIT-licensed test data of
the plannr package, added under tests/fixtures/planner/ with its
licence. tests/plannerFormat.test.cjs imports it, round-trips an export
through ExcelJS and covers the negatives; Playwright cases import the
file through the page and download the export. New instruction text is
in English, pending Transifex.

Thanks to xet7 !
2026-10-08 20:48:39 +03:00
Lauri Ojansivu 711303af32 Import and export boards as Org mode outlines.
Org mode files from Emacs, Orgzly, Beorg or organice import as boards:
level-1 headings become lists and level-2 headings cards. TODO keywords,
including those a #+TODO line declares, decide the done tag; [#A]
priorities become priority:A labels and :tags: labels. SCHEDULED, DEADLINE
and CLOSED become the start, due and end dates, and a :CREATED: property the
creation date. Body text becomes the description, and its - [ ] checkboxes
and childless level-3 headings the card's checklist; a level-3 heading with
children becomes a checklist of its own. #+TITLE names the board.
Timestamps carry no zone in Org and are read and written as UTC.
Repeaters, warning delays and text outside cards are reported in the loss
report. Export writes the same outline.

tests/orgMode.test.cjs covers custom keywords, localized day names, the
round trip and the negatives. A Playwright case imports a file through the
page, and the export audit fetches the new format. New instruction text is
in English, pending Transifex.

Thanks to xet7 !
2026-10-08 11:21:05 +03:00
Lauri Ojansivu e6c8f85518 Import and export boards as OPML outlines.
OPML is what Workflowy, Dynalist, OmniOutliner, Logseq and most other
outliners export and import. Top-level outlines become lists and their
children cards, with the outliners' _note as the description and a completed
item (Workflowy's _complete, Dynalist's complete) as the done tag. Deeper
outlines become checklists with their descendants as items, and the head
title becomes the board title. A list's note and url/htmlUrl/xmlUrl links are
reported in the loss report. Export writes the same with Workflowy's
attribute names; line breaks and tabs in notes are written as character
references so that they survive the XML parser.

Like the Leo outline, the XML is parsed on the server only, with htmlparser2
in XML mode: DTDs and external entities are never resolved, and size and node
counts are bounded. tests/opmlOutline.test.cjs covers a Workflowy/Dynalist
file, the round trip and the negatives (an external entity, a node bomb). A
Playwright case imports an outline through the page, and the export audit
fetches the new format. New instruction text is in English, pending
Transifex.

Thanks to xet7 !
2026-10-08 11:18:14 +03:00
Lauri Ojansivu 1eabb367e7 Import and export boards as Todoist project templates (CSV).
Todoist's Export as a template writes, and Import from template reads, a
CSV with TYPE, CONTENT, DESCRIPTION, PRIORITY, INDENT, AUTHOR, RESPONSIBLE,
DATE ... DEADLINE_LANG columns. Sections become lists, tasks become cards,
indented sub-tasks a Sub-tasks checklist, and notes comments on the task
above. @label words become labels and leave the title, PRIORITY 1-3 become
labels p1-p3 (1 is Todoist's highest; 4 is its "no priority"), RESPONSIBLE
becomes the owner, and DATE becomes the due date, or the start date when a
DEADLINE is the due date. Dates in words such as "every monday", DURATION,
orphan notes and sub-tasks and unknown row types are reported in the loss
report. Export writes the same columns in Todoist's order, with its
view_style=board meta row. Todoist exports no completed tasks, so finished
checklist items are left out.

tests/todoistCsv.test.cjs covers quoted fields, the round trip and the
negatives. A Playwright case imports a template through the page, and the
export audit fetches the new format. New instruction text is in English,
pending Transifex.

Thanks to xet7 !
2026-10-08 11:15:34 +03:00
Lauri Ojansivu 5d26e9fff8 Import and export boards as Focalboard (Mattermost Boards) archive text.
A Focalboard board.jsonl, from a .boardarchive zip, imports with or
without its version line: Focalboard's own importer reads the same
text. The board view's group-by select property becomes the lists.
Other select and multi-select properties become labels, and a property
called Labels gives labels by their own name. The first date property
becomes the due date, or start and due for a range. Text, number, email,
url, phone, checkbox and later dates become custom fields. Text and
heading blocks become the description, checkbox blocks a checklist, and
comment blocks comments. Members, person properties, images,
attachments and card templates are reported in the loss report. Export
writes the same text: a Status property for the lists, Labels, Due and
the custom fields. The field names follow Focalboard's model.Board and
model.Block.

tests/focalboard.test.cjs covers both board forms, the round trip and
the negatives. A Playwright case imports a board.jsonl through the page,
and the export audit fetches the new format. New instruction text is in
English, pending Transifex.

Thanks to xet7 !
2026-10-03 00:17:10 +03:00
Lauri Ojansivu f0323140f6 Import and export boards as Taskwarrior JSON.
Taskwarrior's task export / task import JSON is the task format of the
Taskwarrior command line tool, and WeKan read and wrote neither. It now
imports from the import picker, as a JSON array or one task per line as
versions before 2.4 write it, and exports from the board's export menu.
A completed task goes to Done, a waiting one to Waiting and a started one
to In Progress; project and priority become labels, tags become labels,
entry, due, scheduled and end become dates, annotations become comments
and depends becomes blocked-by dependencies resolved by uuid. WeKan's
wekanlist and wekandescription attributes, which Taskwarrior keeps as
orphaned UDAs, carry list names and descriptions across a round trip.
Deleted tasks, recurring templates, bad dates and unmapped attributes are
reported in the loss report instead of guessed.

tests/taskwarrior.test.cjs covers the mapping, both input shapes, the
round trip and the negatives; the format guards learn the new format and
a Playwright case imports a Taskwarrior export through the page. The new
instruction text is in English, pending translation.

Thanks to xet7 !
2026-10-02 15:53:14 +03:00
Lauri Ojansivu 9d323f2aaf Stop disabling legitimate users: Problems records only attempts, or never block, where ordinary use reaches them.
A blocked record of high or critical severity that names a userId disables
that account. Records on paths ordinary users reach therefore took accounts
away from legitimate users:
- authz.card-member, when a client wrote back assignees still listing a removed
  member - now recorded only for ids that were never on the board;
- History restore after the user was demoted - no longer recorded, as the
  HistoryScopeBleed deliberate omission already says;
- export by an assigned-only member, who reaches the export menus - recorded
  only when the caller cannot see the board;
- a large legitimate import hitting a size limit - recorded at medium (cycles
  and non-plain objects stay high), and the record can no longer throw;
- ssrf.attachment (a Trello board's link to an internal host), ssrf.redirect (an
  identity provider's avatar) and authz.upload-path (a cached older client) -
  still recorded, but blocksAccount: false;
- a REST client writing back a card with the parent it already had - only a
  changed parent is checked. That PUT now also answers 404 for a card that is
  not on the named board and list instead of acting on the id alone.

tests/problemsFalseBlocks.test.cjs drives the blocking decision and the real
assignee filter, and pins each condition; four tests that pinned the old calls
follow them. MegaBleed moves to guarded (its Translation sibling test).

Thanks to xet7 !
2026-10-02 10:44:08 +03:00
Lauri Ojansivu dd7baeec54 Import and export boards as todo.txt.
todo.txt (github.com/todotxt/todo.txt) is the one-task-per-line format
the todo.txt CLI and many compatible apps share, and WeKan read and
wrote neither. It now imports from the import picker and exports from
the board's export menu. A completed task goes to Done; priority becomes
a priority:A label; creation and completion dates become the card's
creation and end dates; +project and @context become labels; due: and
t: become due and start dates; WeKan's list: extension keeps list names
across a round trip. Other key:value pairs stay in the title, a
malformed date is reported instead of guessed, and a completion date is
written only with a creation date, as the format requires. todo.txt has
no descriptions, comments or members, so an export leaves them out.

tests/todoTxt.test.cjs runs the specification's examples, the round trip
and the negatives; the format guards learn the new format and a
Playwright case imports a todo.txt through the page. The new
instruction text is in English, pending translation.

Thanks to xet7 !
2026-09-30 02:54:25 +03:00
Lauri Ojansivu 286ed906a9 Import and export Leo .leo outlines.
The Leo literate editor's XML outline is a new import source and export
format: top-level nodes are lists, their children are cards with the node
body as the description and a marked node as done, and deeper nodes are
checklists. Clones keep their headline and children. The raw XML is parsed
server-side with htmlparser2 in XML mode (no DTDs or external entities), a
self-clone cannot loop and a clone bomb is refused at 100000 nodes, and the
parsed tasks then pass the shared import sanitizer.

Thanks to xet7 !
2026-09-29 18:41:21 +03:00
Lauri Ojansivu 7e784d4f9d Export comments, checklists, parents, people and custom fields to other tools.
The Kanboard, Nextcloud Deck, OpenProject, Asana, Zenkit and Jira exports
carried a card's title, description, due date and labels, while WeKan's own
importers for those tools read far more - so a board sent out and brought
back lost its comments, checklists, parent links, people, start/completion/
creation dates and custom fields. Each formatter now emits them, when
selected, in the shape its importer reads, and a suite runs every export
back through that importer. The formatters are a pure module; Kanboard's
separate route and builder are gone, so it has the export selection and
the admin-only custom field check every other format has.

Thanks to xet7 !
2026-09-29 18:16:20 +03: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 c3caf87a13 Enforce disabled account status and revoke existing sessions.
Fix InactiveBleed across REST, attachment and export authentication, header login, LDAP token issuance and People account controls. Apply administrator-created account flags before insertion and guard token creation atomically.

Thanks to esbrito81 and xet7 !
2026-09-26 01:27:36 +03:00
Lauri Ojansivu 49eaade957 Fix board JSON exports containing HTML card text
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 !
2026-09-11 23:28:44 +03:00
Lauri Ojansivu a49e9d70aa Add a per-board iCal (.ics) export feed, answering #2836.
#808 added the in-app Calendar view; #2836 ("CalDAV or iCal Support") asked
specifically for calendar EXPORT/SYNC via iCal or CalDAV, which did not exist
- only a one-way .ics IMPORT (icsImport.js, #6323) was in the codebase, with
a comment pointing to a separate external project for export.

Adds a new GET /api/boards/:boardId/calendar.ics route (models/export.js)
that streams a subscribable, read-only iCalendar feed of a board's cards:
one VEVENT per Received / Start-End span / Due date, the same four dates the
Calendar view already draws. Public boards need no token; private boards
authenticate the same way every other export route does (?authToken=, or a
logged-in session), and reuse Exporter.canExport()/_scopedCardSelector() so
the feed honours the same board-visibility and swimlane/list scoping as the
JSON/CSV/PDF exports. The ICS text itself is built by a new pure, dependency-
free module, models/lib/icalExport.js (mirrors icsImport.js's style), so it
is unit-testable without Meteor and reusable elsewhere.

The board Export popup gets a new "iCal" group with one link, built through
the existing exportUrl()/EXPORT_FORMAT_GROUPS table so it carries the same
authToken/scope handling as every other export format.

Deliberately EXPORT only, one-way, read-only: full CalDAV is a stateful,
two-way sync PROTOCOL with its own server (PROPFIND/REPORT, ETags,
collections), which is a much larger feature than a dates feed. Every
calendar client that can "subscribe to a URL" - Google Calendar, Apple
Calendar, Thunderbird, Outlook - reads a plain .ics feed like this one
directly; CalDAV is not needed for that.

Thanks to xet7 !

Closes #2836,
2026-09-10 20:35:37 +03:00
Lauri Ojansivu 237b4f3f88 Add Markdown import/export and give GitHub-style import loss reporting
The GitHub/Gitea/Forgejo issue importer (models/lib/externalParsers.js)
mapped only a title, description, one assignee and a due date, silently
dropping everything else. It now also carries a second-and-later assignee,
a milestone title, a non-"completed" state reason and embedded comments
(as tags/description, since the shared Kanboard shape has no field for
them), and returns an `unsupported` list of what it genuinely could not
place - the `{ normalized, warnings, unsupported }` contract from
docs/Features/ImportExport/Format-Coverage.md, flattened onto the existing
board/columns/swimlanes/tasks shape so the KanboardCreator call site in
models/import.js is unaffected.

Markdown is a new import/export format: the "## List name" / "- [ ]"/"- [x]"
task-list convention several markdown-kanban tools use (Obsidian Kanban and
similar) - a plain bulleted list with no checkboxes still imports as open
cards. models/lib/markdownKanbanFormat.js holds the pure formatter (no
Meteor import of its own, so it and the parser are unit-testable without a
server); models/lib/externalParsers.js's parseMarkdownKanban is the import
side. Wired into the import source list and the export menu; the export
route serves plain text/markdown rather than JSON, since the whole point is
a file readable/editable directly or opened by another markdown-kanban tool.

Thanks to xet7.
2026-09-08 17:49:24 +03:00
Lauri Ojansivu bb6f18c469 Export board: the selection reaches every format, and the menu opens wide.
Two halves of the same menu.

THE SELECTION REACHES ALL OF IT. PDF, Excel, JSON and .zip took the parts
checkboxes; CSV, TSV, Kanboard and the eleven JSON dialects built their own
addresses and could not carry them, so ticking "no comments" changed four
downloads out of nineteen. Every board export link goes through the one url
helper now, so ?fields= rides along with all of them.

What a format can DROP depends on what it has, and that is the honest part:

- a CSV has no comments to leave out; what it has is COLUMNS, so the
  selection lands there. Unticking People removes five, Dates removes eight,
  Custom Fields removes the trailing block. One mask filters the header and
  every row, built from the untranslated column keys, so the two cannot
  drift apart;
- a Trello, Jira or GitHub export carries a title, a description, a due date
  and labels. Those three parts are gated and nothing pretends to gate what
  is not there - a negative test checks that gateItem does not mention
  comments, checklists or attachments.

AND THE MENU IS A MENU AGAIN. Twenty-odd entries under three subheadings
were one column to scroll. With room it is laid out in columns like the
language list - width: min(90vw, 760px) and repeat(auto-fill, minmax(210px,
1fr)) - so the whole thing is visible at once. Below 800px nothing changes:
popup.css already makes every popup a full-screen sheet there. The 760 is
mirrored in client/lib/popupOffset.js, which places a popup using its width;
left at the default 380, a wide menu opened near the right edge lands half
off the screen. Both copies say where the other one is.

Thanks to xet7 !
2026-08-14 02:22:48 +03:00
Lauri Ojansivu b0ca226099 JSON and .zip export at every menu, streamed, from the one export popup.
Continues #1173. The board's Export menu had JSON; nothing else did, and
there was no .zip anywhere. Both are now offered wherever an export is - the
board, a swimlane, a list, a card and a checklist - from the same popup,
with the same checkboxes deciding what goes in.

They are the same export in two shapes rather than two exports. The document
is written by models/exporter.js' streaming writer either way, so a .zip's
wekan.json and a .json download of the same scope are the same bytes. What
differs is where the attachments are: base64 inside the document for JSON,
or beside it under attachments/ as the files they are for the .zip. The
"without attachments" option is now offered at every menu instead of only on
the board's.

Both halves stream. The JSON writer already wrote a document at a time from
raw cursors with backpressure; ExporterZip gives it a PassThrough that
archiver compresses as it fills, and pipes every attachment from the file
store rather than reading it into a Buffer. A board with a gigabyte of
attachments costs a gigabyte of disk reads and not a gigabyte of RAM, which
is what makes the .zip the shape to use when the JSON is too large to hold
as one string.

A scoped export is the same wekan-board-1.0.0 document with fewer rows in
it, plus the lists and swimlanes its cards refer to, so what comes out can
be imported back into somewhere. A section the popup did not tick is an
empty array rather than a missing key, for the same reason. A checklist
scope exports the card that holds it, because a checklist alone has nowhere
to land, and a swimlane export carries no board-wide rules.

Less duplication, which is the other half of this:

- every export route - JSON, .zip, PDF, Excel - reads the scope through one
  parseExportScope() and the selection through one parseExportFields(),
  instead of each picking ids out of the query itself;
- the CARD export popup IS the shared body now, with the card as its scope.
  It was its own template with its own field list, its own ReactiveDict and
  its own url builder, which is how its checkboxes came to drive the Excel
  download and not the PDF;
- one url builder serves every format and every scope, and knows that a card
  has export routes of its own so there are not two ways to ask for one
  card's PDF.

tests/boardExportScope.test.cjs gains the JSON/.zip shape, the scoped
document and the single scope parser. Two guards moved rather than being
deleted: they pinned the routes parsing their own ids and the card popup
holding its own copy of the field list.

Thanks to xet7 !
2026-08-14 00:52:48 +03:00
Lauri Ojansivu 40de1799ae GHSA-3gcg-g6rf-w2rx: an invalid authToken crashed the server (remote DoS).
The board export REST endpoints look a user up by the login token in
`?authToken=`. A token that matches nothing makes that lookup answer `undefined`,
and the next line dereferenced it:

  user = await ReactiveCache.getUser({ 'services.resume.loginTokens.hashedToken': … });
  adminId = user._id.toString();          // TypeError on an unknown token

The handlers are async and had no try/catch, so the TypeError escaped as an
unhandled promise rejection - which this app turns into a full process crash (the
note in server/ldapGroupSync.js explains why). One crafted GET against a private
board id took the server down for every user. Reachable by anyone who can obtain a
private board id, which on an open-registration instance means anyone at all.

It was an incomplete fix: models/exportPDF.js and models/exportExcelCard.js
already had the `if (!user)` guard; three handlers in models/export.js and one in
models/exportExcel.js were missed.

Fixed on both levels:

  * Every token lookup in the export models is now followed by the guard - 401
    "Invalid token" and return - including the two handlers that did not crash
    because they hand the user to canExport() instead of dereferencing it. One
    rule for every lookup is what stops the next handler being the missed one.
  * Every export route body is wrapped in safeRoute() (server/apiMiddleware.js),
    which awaits the handler, answers 500 once and logs the request that failed.
    A throw from any other cause is now one broken request instead of an outage.

tests/exportTokenGuard.test.cjs does not check four places by hand: it finds every
token lookup in the export models and requires a guard on each, that nothing
dereferences the user before it, that every route is wrapped, and that the two
handlers which were already guarded stay guarded.

Thanks to laijunyue for the coordinated disclosure, and xet7 !
2026-07-26 15:02:55 +03:00
Lauri Ojansivu 6678c92e08 Security log: wire upload / metrics-XFF / export-authz remediation points.
Record more runtime rejections into the eventlog (Admin Panel Problems):
- fileValidation.js: log every upload rejection (dangerous MIME content ->
  xss.mime, mime not on the allow-list -> file.mime, over size limit ->
  file.size).
- metrics.js: log spoofing.xff when a /metrics request carrying an
  X-Forwarded-For header is denied (likely forged-whitelisted-IP attempt).
- export.js: log authz.export at all four export-authorization denial paths.
All calls are best-effort/guarded (server-only require, try/catch) so logging
never breaks the guard. Source-guard tests added.
2026-07-19 13:59:11 +03:00
Lauri Ojansivu 1669a1af19 Fix 7 security issues reported by meifukun.
- Avatar localization redirect SSRF: fetch avatars via fetchSafe (DNS-pinned,
  redirects rejected) instead of native redirect:follow, and validate
  profile.avatarUrl scheme (http/https/data:image/local) at write time.
- Trello import source.url stored XSS: only render/store an http(s) activity
  source URL, so a javascript: board url can no longer execute on click.
- Trello LIVE import readable SSRF: gate every attachment/background/avatar
  download with validateAttachmentUrl, matching the offline import path.
- CAS login global user-data race: store validated CAS user data per credential
  token instead of a module-global _userData (fixes account-takeover race).
- Metrics X-Forwarded-For whitelist bypass: only trust XFF behind
  METRICS_TRUST_PROXY (parsed spoof-resistantly from the right); else use the
  socket peer address.
- Stale impersonation export bypass: remove the "|| impersonateDone" export
  authorization bypass; require real board visibility (canExport) only.
- Invitation code brute force: generate invitation codes with a 128-bit CSPRNG
  (crypto.randomBytes) instead of a 6-digit Math.random value, and rate-limit
  createUser (DDPRateLimiter).

The OIDC shared serviceData race from the same report was already fixed (#4897,
the per-login objects are callout-local). Source-guard regression test added
(tests/securityMeifukun.test.cjs) and wired into test:unit:node.

Thanks to meifukun and xet7 !
2026-07-19 12:22:56 +03:00
Lauri Ojansivu 06fdede782 Admin Panel / Features / Security: import/export privacy controls
Six new optional toggles (all default off) governing how boards and user data
cross the WeKan boundary, enforced server-side so they cannot be bypassed from
the client:

- Disable all import / Disable all export: master switches that turn off every
  import/export feature. importBoard and cloneBoard call assertImportEnabled;
  every Exporter build()/buildStream() call assertExportEnabled. The import and
  export menu options are hidden in the UI via global importDisabled/exportDisabled
  Blaze helpers.
- Disable import avatars / Disable export avatars: never carry avatars into/out of
  WeKan. Import is gated at the single localizeAvatarFromBuffer choke point (covers
  WeKan JSON import, LDAP, OIDC/OAuth2 login sync and board-open localization) plus
  Trello inlineMemberAvatars; export skips the base64 avatar embed + avatarUrl in
  both Exporter paths.
- Anonymize import users / Anonymize export users: replace username/fullname/initials
  with counter placeholders (user1, user2, ...), drop avatars, and rewrite @username
  mentions + requestedBy/assignedBy in card/comment text. The placeholder word "user"
  is translated to the current user language. Export covers both build() and the
  streaming buildStream() (which does an id-only pre-scan so mentions streamed before
  the users array resolve to matching labels); import scrubs the incoming board in
  WekanCreator before any placeholder user or card is created.

New shared server helper models/lib/importExportSecurity.js holds the settings
read, guards, anonymization map builder and text rewriter. Adds settings
disableAllImport, disableAllExport, disableImportAvatars, disableExportAvatars,
anonymizeImportUsers, anonymizeExportUsers, published in the public setting.
2026-07-14 13:53:11 +03:00
xet7 41cd166358 Stream board exports (JSON, CSV/TSV, Excel) with bounded memory
The board export routes buffered the entire board in memory before sending:
JSON export built one object with every card, comment, activity, checklist and
base64 attachment; CSV called that same build(); Excel additionally loaded data
it never renders (activities/checklists/subtasks/rules) and did O(n^2)
result.cards.find() lookups. On big boards this peaked at gigabytes and could
exceed V8's max string length.

Now:
- Exporter.buildStream(res) writes the JSON document straight to the response a
  document at a time from raw Mongo cursors, encoding each attachment file to
  base64 in 3-byte-aligned chunks. Same _format/keys, so import round-trips.
- Exporter.buildCsvStream(res) keeps only the small lookup tables in memory and
  streams cards from a cursor, writing one CSV/TSV row at a time.
- ExporterExcel uses the exceljs streaming WorkbookWriter, committing each row
  to the response, drops the unused collections, and resolves parent/comment
  card titles via an id->title map instead of scanning all cards.
Peak memory stays flat regardless of board size.
2026-07-10 22:57:40 +03:00
Lauri OjansivuandClaude Opus 4.8 c1752c5fba Export big boards: optional JSON export without base64 attachments (#5870).
Big boards could not be exported as JSON because every attachment is base64-
encoded inline into one object that is then JSON.stringify-ed, which overflows
V8's maximum string length (and loads every attachment buffer into memory at
once). Adds an optional ?attachments=false query parameter to
GET /api/boards/:boardId/export that exports the board structure and attachment
metadata while skipping the base64 file data entirely, so large boards export
successfully. A matching "Export / JSON (without attachments)" entry is added to
the board export menu. The default export is unchanged (attachments still
included). Includes a REST regression test. Thanks to xet7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 11:35:28 +03:00
Lauri OjansivuandClaude Opus 4.8 309425545f Return proper status + body from board export error responses
The export endpoints passed a bare number to sendJsonResult (e.g. sendJsonResult(
res, 403)), but sendJsonResult treats its second arg as an options object, so a
number produced HTTP 200 with an empty body instead of the intended 4xx. Pass
{ code, data } so 404/400/403/auth failures return the correct status and a JSON
error body.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 15:53:36 +03:00
Lauri Ojansivu f0bce67a3b More Import Export and Rules features.
Thanks to xet7 and Claude !
2026-06-15 04:07:33 +03:00
Lauri Ojansivu 08ae61161c Fixed TokenBleed: unauthenticated login-token minting via un-awaited auth check in
`POST /api/createtoken/:userId`](https://github.com/wekan/wekan/blob/main/CHANGELOG.md)
(CWE-863, CWE-287). `Authentication.checkUserId` in `server/authentication.js` is an
`async` function, so its 401 (undefined `userId`) and 403 (not an admin) throws become
rejected promises rather than synchronous exceptions. The REST handlers in
`server/models/users.js` and `server/models/boards.js` called it without `await` inside a
plain synchronous `try/catch`, which cannot catch a rejected promise, so the failed check
never stopped execution. `POST /api/createtoken/:userId` then went on to mint and return a
usable login token for any user ID in the URL — including an admin — with no credentials at
all (unauthenticated account takeover). The same detached-rejection bypass also affected
`GET /api/users`, `GET /api/users/:userId`, `PUT /api/users/:userId`, `POST /api/users/`,
`DELETE /api/users/:userId`, `POST /api/deletetoken`, `GET /api/boards`,
`GET /api/boards_count`, `DELETE /api/boards/:boardId`, `GET /api/users/:userId/boards` and
`POST /api/boards/:boardId/copy`. Fixed by awaiting every async `Authentication` check (and
making the two non-`async` handlers `async`) so a failed check rejects before any privileged
code runs. The same un-awaited pattern in the board/card/Excel/PDF export handlers
(`models/export.js`, `models/exportExcel.js`, `models/exportExcelCard.js`, `models/exportPDF.js`,
which were backstopped by `exporter.canExport()`) and in the checklist-create handler
(`server/models/checklists.js`) was given the same await pass. Affected Wekan v9.35 and earlier.

Thanks to Zion Boggan, xet7 and Claude.
2026-06-10 19:39:05 +03:00
Lauri Ojansivu ce3e51b147 Fix Impersonate User. Show/Edit Avatar at Admin Panel/People/People.
Thanks to ahlgrimma, DnT1mmer, robbagithub, norrig and xet7 !

Fixes #6226,
fixes #6101,
fixes #3327,
fixes #4748
2026-04-07 09:52:41 +03:00