315 Commits
Author SHA1 Message Date
Lauri Ojansivu 395f10e030 Add Admin Panel Nodemailer service settings
Keep service-specific values on the server, never publish passwords to the browser, and let the administrator opt out of MAIL_URL in favor of Nodemailer's bundled SMTP service profiles. Add unit, negative, publication, and browser coverage.\n\nThanks to xet7 !
2026-09-01 23:09:31 +03:00
Lauri Ojansivu c8e7b704df Close attachment content-type bypasses
Reject slash-separated and unquoted event handlers, validate filesystem uploads as well as migrated uploads, and force browser-executable attachment metadata through sandboxed opaque downloads on every storage backend.\n\nThanks to avrlab233 and xet7 !
2026-09-01 10:50:55 +03:00
Lauri Ojansivu 7b060f57eb Keep cards in their real swimlanes and persist view changes
Include archived swimlanes when distinguishing real card homes from deleted-swimlane orphans, while choosing the first active swimlane for genuine fallback cards. Keep an authenticated board-view choice pending until the reactive profile confirms it so method callback ordering cannot snap the interface back.

Thanks to hmeunier95 and xet7 !

Fixes #6659,
2026-08-31 13:27:15 +03:00
Lauri Ojansivu 4be77e7189 Honor muted boards for every notification source
Apply the board watch level at the final recipient boundary so direct assignments, mentions, card or list watchers, and broad-event notifications cannot send mail or profile notifications to muted users. Keep Watching and Tracking active members eligible, and cover missing/default-muted, inactive and non-member recipients.

Thanks to Nissulya and xet7 !

Fixes #6658,
2026-08-31 13:27:15 +03:00
Lauri Ojansivu b39d57bf78 Publish and use the WeKan version manifest
Read the newest component versions from the fixed wekan.fi/version.txt endpoint and render its strictly validated five lines as escaped preformatted text in the Admin Version pane.

Generate the same manifest and install-page block from the release's Dockerfile pins and latest validated FerretDB tag in both local and release-all website flows. Add positive, negative, workflow and UI coverage.

Thanks to xet7 !
2026-08-30 18:04:24 +03:00
Lauri Ojansivu 3b613201a3 Add newest version check to Admin Panel
Show the latest published WeKan and FerretDB release from the Version pane while keeping GitHub access server-side and restricted to Global Admins. Validate version tags and exact release URLs before rendering escaped text, and report network or invalid-response failures without exposing upstream content. Add unit, negative, RTL and browser coverage.\n\nThanks to xet7 !
2026-08-30 18:04:24 +03:00
Lauri Ojansivu 96b42c3d38 Render notification titles safely in email
Escape the completed localized notification before creating HTML line breaks and remove subject newlines so stored card, list, board, actor, comment, and translation values remain text.

Thanks to binary-lover and xet7 !
2026-08-29 18:31:41 +03:00
Lauri Ojansivu dffe85cce4 Block unauthorized cross-board rule actions
Validate automation destinations before storing a rule and again before executing legacy or imported move, link, and bulk-move actions. Record denied attempts through the bounded RuleBleed canary.\n\nThanks to crypto-nidh and xet7 !
2026-08-29 09:43:23 +03:00
Lauri Ojansivu ca2838ab2f Restore database-independent MongoDB selectors 2026-08-29 06:01:39 +03:00
Lauri Ojansivu 8d427583ef Harden avatar attachment and swimlane boundaries
Serve browser-executable avatar and legacy attachment MIME types as sandboxed opaque downloads, and require board write permission before creating a default swimlane. Summarize rejected swimlane creation attempts in Admin Panel Problems and add positive plus repository-wide negative regression coverage.

Thanks to crypto-nidh and xet7 !
2026-08-29 06:01:38 +03:00
Lauri Ojansivu 29fd503317 Refresh lazy card windows after card changes
Keep FerretDB's bounded card window as a fetched snapshot, but observe the unrestricted indexed selector and diff a fresh window whenever a matching card changes. Publish added, changed and removed DDP messages so remote edits and cross-list moves render without a browser reload. Cover additions, edits, removals, unchanged cards, cleared fields and a forced-lazy browser scenario.

Thanks to hmeunier95 and xet7 !

Fixes #6645,
2026-08-28 17:40:10 +03:00
Lauri Ojansivu 18bcbdd0d4 Bind search pagination sessions to their users
Require both pagination publications to authenticate the subscriber and load only a search session owned by that same user. Record attributable logged-out probes as SessionBleed without letting logging affect the denial.

Thanks to crypto-nidh and xet7 !
2026-08-27 10:19:56 +03:00
Lauri Ojansivu 12f2fddc2c Fix OIDC and account metadata security boundaries.
Thanks to crypto-nidh and xet7 !
2026-08-26 22:41:44 +03:00
Lauri Ojansivu b552af1606 Import legacy boards privately by default
Treat only an explicit supported public permission as public during WeKan board import. Missing Sandstorm-era fields, malformed values, and lookalikes now fail closed to private while explicit private and public exports retain their intended visibility. Add focused and browser regressions.

Thanks to xet7 !

Fixes #1991,
2026-08-25 18:15:26 +03:00
Lauri Ojansivu 8dff96d7b3 Preserve copied comment history
Keep each copied comment's original author and timestamps, re-home it without mutating the cached source, and avoid generating false new-comment activity. Add positive, negative, wiring, and REST browser regressions.

Thanks to ocdtrekkie, 2martens, frmwrk123 and xet7 !

Fixes #1213,
2026-08-25 17:57:13 +03:00
Lauri Ojansivu 7d67f80df5 Return mobile Search directly to the board
Close the full-screen Search sidebar when its Back control is used on a mini screen, while preserving desktop and other sidebar transitions. Add positive, negative, wiring, and mobile browser regressions.

Thanks to 1ubuntuuser and xet7 !

Fixes #3576,
2026-08-25 17:52:23 +03:00
Lauri Ojansivu 951b072b58 Close card details after remote removal
Observe the card that opened each details view and clear desktop, mobile route, and popup state when another client removes it or moves it to a different board. Add positive, negative, wiring, and mobile browser regressions.\n\nThanks to rptl and xet7 !\n\nFixes #3114,
2026-08-25 17:45:40 +03:00
Lauri Ojansivu 0847af8ec6 Add optional swimlane grouping to Table view
Keep the flat table as the default and let each user persist an optional grouped mode. Group cards in board swimlane order, preserve the selected column sort inside each lane, and insert section rows after pagination so headers never consume card slots.

Add user-isolation, empty-state, section-boundary and browser persistence coverage.

Thanks to rmb82 and xet7 !

Fixes #6634,
2026-08-25 17:39:23 +03:00
Lauri Ojansivu 828cb5e534 Restore sorting to board Table view
Make text, member, label and date headers toggle a shared client-side ascending or descending comparator. Keep empty date values last and use card title as a deterministic tie-breaker.

Add comparator boundary coverage and a browser header-toggle regression.

Thanks to rmb82 and xet7 !

Fixes #6633,
2026-08-25 17:32:57 +03:00
Lauri Ojansivu ad6a7b7c8c Make board Table view responsive
Use the available browser width and default card titles to a compact single line with an escaped native tooltip. Add a per-user wrap preference that persists locally.

Cover default, toggled and user-isolated preference behavior plus the rendered browser layout.

Thanks to rmb82 and xet7 !

Fixes #6632,
2026-08-25 17:31:29 +03:00
Lauri Ojansivu 6c9ba47456 Prevent fast touch drags from opening cards
Suppress only the synchronous click that touch-punch emits after a jQuery UI sortable drag. Ordinary taps and later clicks retain their normal behavior.

Add positive and negative unit coverage plus a real fast-touch drag browser regression.

Thanks to xator91 and xet7 !

Fixes #5421,
2026-08-25 17:27:33 +03:00
Lauri Ojansivu c69bf503c3 Bound high-volume database queries
Scope attachment and checklist discovery to authorized boards, project only fields consumed by filename search, retain only the requested text-ranking window in memory, page Due Cards without truncating the result set, and add compound indexes for lazy and due-card query shapes.\n\nThanks to xet7 !
2026-08-25 15:40:39 +03:00
Lauri Ojansivu 00026ff231 Reduce FerretDB board publication polling
Default FerretDB launchers to adaptive card loading, keep unrelated public boards out of All Boards, index the narrowed query shapes, and share linked-card discovery within one composite parent evaluation without TTL authorization caching.

Thanks to xet7 !
2026-08-25 15:04:22 +03:00
Lauri Ojansivu a1dfa88b49 Report blocked security attempts
Add bounded, attributed Problems events for denied MiniProfileBleed, PositionHistoryBleed, and CasBleed attempts. Keep UserSearchBleed and SubtaskExportBleed silent because their safe paths are indistinguishable from ordinary use. Also prevent clients from rewriting validated position history.
2026-08-25 01:26:28 +03:00
Lauri Ojansivu bdec1744f4 Apply board filters in Table view
Build the Table card query from the active board Filter and an immutable board and archive scope, while retaining the view-specific text search.

Thanks to rmb82 and xet7 !

Fixes #6629,
2026-08-25 01:14:39 +03:00
Lauri Ojansivu 3f69df3170 Require authentication before importing boards.
Reject anonymous importBoard and importScoped DDP calls before argument parsing, feature checks, parsers or direct database writers can run. Carry the authenticated method user explicitly into scoped imports and add source-level plus logged-out browser regression coverage for ImportBleed.

Thanks to Char0n1507 and xet7 !
2026-08-23 18:56:39 +03:00
Lauri Ojansivu 6ec619e438 Bound platform resources and report runtime failures. 2026-08-23 00:16:15 +03:00
Lauri Ojansivu 216146edc9 Restrict Organization and Team DDP writes.
Thanks to Char0n1507 and xet7 !

Fixes GHSA-p4cq-83j9-7g73.
2026-08-21 23:41:09 +03:00
Lauri Ojansivu d1c75e9950 Use canonical REST board write access.
Thanks to Char0n1507 and xet7 !

Fixes GHSA-f396-42fx-vr88.
2026-08-21 23:08:34 +03:00
Lauri Ojansivu 518a4d2fec Normalize uploaded JFIF names to JPEG.
Replace the unrecognized JFIF suffix with the detected JPEG extension so downloaded images use a portable filename and open through normal desktop file associations. Keep existing JPG and JPEG suffixes unchanged and cover the sanitization log reason.\n\nThanks to xet7 !
2026-08-18 23:14:12 +03:00
Lauri Ojansivu ff9d0bab8b Add country login locations to Admin Panel People.
Place a Location column immediately before account Status. Each user shows a flag and successful-login count for every country known from that user's addresses.

Clicking a country opens a Table.md report for that person. Its left menu lists countries busiest first, while the selected country shows city, IPv4, IPv6, and the person's first and last login times for each address. Search, pagination and Back use the shared table controls.

Location details are fetched once per People page and restricted through the same site-admin or tenant-admin scope as the People list. Unknown locations are not guessed, stale page responses are ignored, and new logins retain their supplied location on the per-user address tally.

Focused positive and negative coverage checks country totals, ordering, both address families, city rows, timestamps, menu/table wiring, authorization and missing geography.

Thanks to xet7 !
2026-08-18 23:07:48 +03:00
Lauri Ojansivu 480074969b Show available initials in the Offices people column.
The server computed each person's initials, but person grouping discarded them and the shared table tried to find the user again in client cache. Users not published to that cache therefore rendered as empty grey circles.

Carry initials through every table layer and let the existing avatar template render supplied initials before falling back to its reactive user lookup.

Regression coverage checks the person-grouped response, shared table cell and direct initials fallback.

Thanks to xet7 !
2026-08-18 22:49:53 +03:00
Lauri Ojansivu 3539f2bbf3 Group Admin Panel Offices login addresses by person.
Show each person's successful-login addresses together, with separate IPv4 and IPv6 columns, the latest country flag and city supplied by Cloudflare or another supported proxy, and that person's login count for each address.

Search continues to match usernames, full names, addresses and locations. Address metadata for each page is fetched in one batch, and people sharing an address remain separate groups with their own counts.

Focused coverage checks grouping, shared addresses, both address families, proxy location headers, missing locations and the person-first server response.

Thanks to xet7 !
2026-08-18 22:48:26 +03:00
Lauri Ojansivu a7879012c9 Fix custom-field interactions and deleted-field exports.
Thanks to Heart1010 and xet7 !

Fixes #6611.
2026-08-18 18:10:47 +03:00
Lauri Ojansivu 5f1d422117 Filter Recovery events by operation outcome. 2026-08-17 23:58:04 +03:00
Lauri Ojansivu 7a0b7b7cdb Audit failed permanent-delete attempts with status and address.
Record successful, failed, and unauthorized permanent-delete attempts in Recovery with Boolean Done and deleted-data fields, actor ID and username, proxy-aware IPv4 or IPv6, and requested board IDs and titles. Render Done first with green success, red failure, and yellow deletion icons. Preserve original errors after recording failed attempts.

Thanks to xet7 !
2026-08-17 23:54:36 +03:00
Lauri Ojansivu fd0369b899 Skip empty board visibility branches.
Do not add org, team or domain elemMatch clauses whose cleaned id list is empty. Preserve the active direct-member clause and every RevokeBleed security invariant, with positive and negative selector coverage.\n\nThanks to xet7 !
2026-08-17 23:07:50 +03:00
Lauri Ojansivu 4ab3161b4f Add permanent delete to Admin Panel Problems.
The Delete pane sits above Notifications and exposes the existing, default-off enablePermanentDelete gate for Global Admins. It has its own URL, documentation, and regression coverage for menu order, rendering and the setting handler.

Thanks to xet7 !
2026-08-17 21:11:35 +03:00
Lauri Ojansivu 0885b9a10b Share one card document adapter across PDF and Excel exports. 2026-08-17 04:04:13 +03:00
Lauri Ojansivu ec9f9e76d8 Use the detailed card layout for board Excel exports. 2026-08-17 03:57:58 +03:00
Lauri Ojansivu 1b0f2075e5 Export complete card fields at every scope. 2026-08-17 03:43:01 +03:00
Lauri Ojansivu bb5275e974 Select requesters and assigners from board members. 2026-08-17 03:05:41 +03:00
Lauri Ojansivu 4b27f4fc45 Name PDF and Excel exports by their localized scope. 2026-08-17 02:34:38 +03:00
Lauri Ojansivu fb52149e94 Align PDF and Excel card attachment layouts.
Place three previews per row with filename-only captions below, retain every attachment in the six-field details table, and draw PDF labels, metadata positions, and checklist progress like the printable Excel card.\n\nThanks to xet7 !
2026-08-17 01:52:34 +03:00
Lauri Ojansivu 7eb0d5ac50 List previewed image attachments only once.
Remove successfully displayed images from the attachment bullet list while retaining non-image files and images whose preview could not be read. Keep filename and size in each preview caption.\n\nThanks to xet7 !
2026-08-17 01:43:26 +03:00
Lauri Ojansivu 9ff542b9b1 Wrap PDF metadata and arrange image previews in rows.
Keep complete date and time values visible, place up to three attachment previews on one atomic row, and caption each preview with its filename and human-readable size.\n\nThanks to xet7 !
2026-08-17 01:17:53 +03:00
Lauri Ojansivu 3b47e10ee5 Normalize markdown-it module interop.
The Meteor production bundle exposes markdown-it through its default export while bare Node returns the constructor directly. Normalize both shapes so loading the export routes cannot stop WeKan during startup.\n\nThanks to xet7 !
2026-08-17 01:02:51 +03:00
Lauri Ojansivu c796fc6c6b Complete multilingual PDF and Excel exports.
Embed OFL-licensed GNU Unifont fonts in PDF exports, centralize the printable Excel card renderer on the shared card document, and consistently use the saved user language or browser fallback plus the opened card's date format. Document the XLSX font-embedding limitation and cover the locale, font, PDF, and workbook behavior with regression tests.\n\nThanks to xet7 !
2026-08-17 00:50:10 +03:00
Lauri Ojansivu 74888f1edf Embed attachment images in PDF exports.
Move the Excel and PDF export design and progress out of TODO Later into format-specific documentation, then complete JPEG and PNG previews for card and board PDFs with failure-safe image handling and byte-level tests.\n\nThanks to xet7 !
2026-08-17 00:37:22 +03:00
Lauri Ojansivu f6e3144452 Step 4: the PDF draws the shared card document, so both formats have one layout.
"PDF export layout should be like Excel layout", and "export board, swimlane,
list, card to Excel and PDF should have same layout like export card to Excel" -
with markdown rendered and only the fields that have data.

The PDF laid a card out itself: a hundred and sixty lines that had to be kept in
step with the Excel exporter's layout by hand, and were not. The Excel export
drew sections under filled headers with label/value columns; the PDF drew a flat
list of monospaced lines. Both ask models/lib/cardDocument.js for the layout now
and only the drawing differs, so a section added to one is in the other.

WHAT A PAGE MAKES OF THE DOCUMENT, in pdfDocument.js: a section is a filled grey
bar, a meta block is a row of label/value columns with the labels in bold, text
is markdown wrapped and styled, a list keeps its marker, a comment keeps its
date and its author. The bars are real rectangles - drawn outside BT/ET, because
a PDF text object may not contain a path - and the y of each line is known from
its index, so it needs no layout pass.

What is left in the exporter is the MAPPING: Meteor documents, user ids and
dates turned into the plain names and strings the document takes. That is the
only part that knows a Mongo document from a string.

FOUR REGRESSIONS THE EXISTING GUARDS CAUGHT, every one a field that would have
gone missing from the file:

  * requested by / assigned by - a card's own record of who asked for it, and a
    suite exists precisely because they have been lost from an export before;
  * card number, last activity, spent time and overtime;
  * the labels and the dates, which two suites check by name;
  * and every label's English fallback. The document was passing keys without
    one, so a missing translation would have printed "card-due" on the page.
    The words live in one table now, which also stops a PDF saying "Due" where
    a spreadsheet says "Due date".

The guards themselves follow the layout to where it went: they read the exporter
AND the document, because a field is now carried by the pair, and reading only
the exporter would report a field as lost when it had merely moved to where both
formats take it from.

Verified as far as this sandbox allows: the mapping is extracted from the file
and executed against a stand-in exporter (tests/pdfDrawsTheDocument.test.cjs),
the document it builds is checked section by section, and the bytes are checked
to be a PDF whose xref offset points at its table. There is no PDF viewer here,
so how the page LOOKS is still to be checked by eye.

Thanks to Heart1010 and xet7 !

Fixes #6586,
2026-08-16 23:50:10 +03:00