mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
b77a1663d80cb3ee5d876c491da8508ca5f403bc
162
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
b77a1663d8 |
Remove Member Settings / Font / Text background color.
A colour painted behind the text needs elements to sit on, and neither choice of them looks good. On the boxes - which is what it did, from <body> - it painted the whole window: the board canvas and the empty space under the lists, which is a page background and not a text background. On the elements that actually carry text it striped every heading, menu row and paragraph with a full-width band. A setting nobody can make look good is worse than no setting. The wheel and its Unset button are gone from the popup, nothing reads profile.uiTextBgColor, and no stylesheet rule paints it. A profile that already has a colour is cleaned rather than left dormant: setUiColors unsets the field on every call, whatever it is passed - and it still accepts the argument, so an older client cannot fail against a newer server. The schema key stays declared for exactly one reason: a modifier touching a key SimpleSchema does not know is rejected, which would leave those profiles the only ones that could not be cleaned. The text colour beside it stays. Thanks to xet7 ! |
||
|
|
e86e7abe05 |
Member Settings: "All Boards" beside Default, and popup rows highlighted like the menu.
Two things in Member Settings / Change color. ALL BOARDS. Beside "Default (no override)", on the same row, a second switch: All Boards. Turned on, every tile in the All Boards overview takes the THEME's lighter colour - a white veil over --theme-accent, which is one shade up from whatever the theme is at any theme, with no second variable to keep in step and no color-mix() - with white text on it, instead of the colour its own board was given. Turned off, which is the default, the overview is exactly what it was. That is #6593's observation, as a per-user choice rather than a stylesheet. The pull request makes every tile white for everybody, and the observation behind it is right: a wall of boards in eleven colours reads as a palette rather than a list. The conclusion is not, because "the tile colours are noise" and "the tile colours are how I find my board" are both true, of different people - so it goes where the rest of that user's theme is chosen, and it is off unless asked for. A board with a background IMAGE keeps its image: that is a picture somebody chose, not a colour, and painting over it would be losing something rather than calming it down. It is profile.allBoardsThemeTiles (optional boolean, absent = off), flipped by toggleAllBoardsThemeTiles, which writes the CALLER and refuses an anonymous one, and it reaches the page as has-theme-board-tiles on <body>, so it follows the user to every page that shows board tiles. Only the user's own scope of the shared picker has the switch: a board has no overview of its own, and a site admin does not choose this for everybody. The label is the existing `all-boards` string, so no new key needs 135 translations to say what one already says. THE HIGHLIGHT. The row under the pointer in a popup was filled with a fixed dark navy (#005377) that appears nowhere else in WeKan, and stayed navy however the user had themed it. The All Boards left menu fills its selected row with var(--theme-accent, #2980b9) and turns the label and the icon white, and so does the Admin Panel; the popup does now too, so there is one selected-thing look rather than three. The colour needs !important because the base rule pins every row's text to #000 !important, and the icon is named separately for the same reason. tests/allBoardsThemeTiles.test.cjs pins both, with the negatives that matter: only the user scope has the switch, an image tile is left alone, every new rule is under the body class so the overview is untouched with it off, and the navy is gone. Thanks to khuongsatou and xet7 ! |
||
|
|
184e1713d3 |
Notifications: cap the tray array, which SQLite was being rewritten by.
#6533. A snap instance reports FerretDB at 737% CPU, logins taking over a minute, boards not appearing, and logs full of: [db-retry] the database was busy: 0 write(s) retried, 0 succeeded on a retry, 3 given up on. ValidationError: ... [collection.go:191 sqlite.(*collection).UpdateAll] database is locked (5) (SQLITE_BUSY) at _helpersConstructor.addNotification (models/users.js:2248) The stack names the same write every time. addNotification is an `$addToSet` on `profile.notifications`, which is an array INSIDE the user document: adding one entry means reading the whole document, scanning the array for a duplicate, and writing the whole document back. The cost is proportional to the array. FerretDB on SQLite has a SINGLE writer, so those rewrites queue behind each other and start failing outright - and login, which also writes to the user document, queues behind them. That is the slow login, the boards that never arrive and the pinned CPU, all from one array. WHY IT GROWS WITHOUT LIMIT: the cleanup added in #5685 removes a notification only when every entry for its activity has been READ and is past its removal age. A user who does not clear their tray accumulates entries forever, and nothing else in the product shrinks that array. The instance in the report has been running since at least 2026-07-29 with contention warnings, which is what an array that only ever grows looks like from the outside. So the same cleanup pass now also caps it: the newest NOTIFICATION_TRAY_MAX_PER_USER entries are kept (default 1000, a backstop rather than a retention policy) and the rest dropped. Newest rather than oldest because `$addToSet` appends, so the tail is the recent activity a tray is for; an unread notification from months ago is not something anybody is going to act on. Three things it is careful about. The cap is applied to what is LEFT AFTER the expiry pull, not before, or it would trim entries that were about to be removed anyway and keep fewer than the cap. A user needing neither change is not written to at all - the whole problem here is writes to user documents, so the cleanup must not add one per user per day for users with nothing to do. And it stays ONE write per user, which is what #5685 collapsed K writes into; the capped case uses `$set` because a `$pull` would have to list the entries it is removing, and there being too many of them is the point. This bounds the array. It does not make SQLite a multi-writer engine: an instance this busy still wants the PostgreSQL backend, which is what the Problems pane already tells the admin. tests/notificationCap.test.cjs pins the decisions - keeping the newest, leaving an array under the cap completely alone (so no write), refusing to act on junk or a disabled cap, that unread entries are what this catches because the existing rule provably cannot, and that it is still one write per user. Thanks to Nissulya and xet7 ! |
||
|
|
b4ebe48d7b |
WhereBleed: eight Admin Panel handlers ran the caller's selector unchecked.
GHSA-phm4-4v26-j2vq, CWE-943, CVSS 5.8. The Admin Panel's people, org, team and
translation publications and their companion count/page methods take a query
selector from the client and validate only its TYPE:
check(query, Match.OneOf(Object, null));
which is not validation, because a MongoDB selector is executable data. `$where`
makes the database run the caller's JavaScript once per document scanned, so
Meteor.subscribe('team', { $where: 'while(true){}' }, 25, 0)
pins a database worker for as long as the caller likes and is repeatable: denial
of service for every tenant on the instance, from one narrowly-scoped account.
The reporter demonstrated both halves on v10.81 against mongo:7 - `$where:
'sleep(2000) || true'` made the `people` subscription take 2.03s and return the
document, `$where: 'false'` returned nothing in 0.00s - which is the caller
deciding in JavaScript which documents come back.
It needs an authenticated admin session, so it is not reachable by a board member
or a visitor. It is still worth the fix at this severity because the people and
org surfaces are open to a PER-TENANT Global Admin, a role meant to be confined
to one Organization, and those two wrap the caller's selector as
`{ $and: [query, restriction] }` rather than stripping execution operators out of
it - so merging the tenant restriction never removed the `$where`, and a role
scoped to one tenant reached instance-wide impact.
WHAT MAKES THIS ONE PARTICULAR is that the defence was already here. classifySelector
(models/lib/injectionDetect.js) and hasWhere (models/lib/mongoSelectorSafety.js)
were written for exactly this class and were wired into the card-window
publication, with unit tests. Eight sibling handlers taking the identical shape of
client-supplied selector simply never called them. So this adds no new detection
logic: cardsWindow.js's own helper moves, unchanged, to
/server/lib/selectorGuard.js, and all nine call sites share the one copy. A second
copy of the check would be the same bug set up to happen again, which is why
cardsWindow.js now imports rather than keeps its own.
Each handler refuses with the "match nothing" selector that publication already
uses in production, `{ _id: { $in: [] } }` - frozen, so a caller cannot mutate the
shared object into one that matches - so a refused request returns an empty result
instead of throwing at an admin mid-page, and the canary still records who sent
what from where. Ordinary Admin Panel behaviour is untouched: none of the
searches, filters, regexes, $or/$and/$in/$elemMatch or date ranges those panes
send contains an execution operator, and the test pins fourteen real ones going
through unchanged.
FerretDB, WeKan's default database, rejects $where itself, so this degrades to a
rejected query there; the supported real-MongoDB path
(docker-compose-mongodb-v7.yml) is where it was reproduced. MongoDB 7 also happens
to reject $where inside the aggregation pipeline the four count methods use, but
that is an engine-level accident for one operator on one call path - $function and
$accumulator are legitimate aggregation operators - so the count methods are
guarded like the rest rather than left to it.
tests/selectorGuard.test.cjs pins the reported payloads (including nested inside
$and/$or, which is how the tenant merge would carry them), the other execution
operators, the fourteen ordinary queries, that all nine call sites route through
the guard, that none still passes the raw selector afterwards, and that exactly
one copy of the check exists. Three existing suites asserted the old shape -
canaryCoverage on where the canary trips, injectionDetect on the helper living in
cardsWindow.js, tenantWiring on the scope function receiving the raw query - and
each is updated to the new one, saying why.
Thanks to TungNGo02 and xet7 !
|
||
|
|
90a41dbb22 |
Two queries per request instead of two per card.
Neither of these gave a wrong answer. They asked the right question one document at a time, and each await is a full round-trip that starts only once the last one finished - invisible on a board with four cards, and the whole cost of the request on a real one. The bulk label endpoint (PUT .../cards/labels) awaited a getCard per id and then an update per id. At BULK_CARDS_MAX = 500 that is ONE THOUSAND sequential round-trips for a single request. The reads are all the same question, so they are one `$in` query indexed into a Map; the writes genuinely differ - each card merges its own labelIds - so they stay individual updates, but they are issued together and awaited once instead of each waiting for the last. Two details that had to survive: the loop still iterates cardIds rather than the query result, because a batch read comes back in the database's order and without the ids that matched nothing - iterating it would silently reorder `updated` and lose `notFound`. And every write is awaited before the 200 is sent, so the response still means what it says. The bulk DELETE beside it is deliberately left alone: its per-card work is real (cardRemover runs the sub-item hooks, each card gets its own activity), so batching the reads would save one query inside a loop that does far more than query. Global search resolved each `user:`/`member:`/`assignee:`/`creator:` name with its own awaited findOne, so `member:ann member:bob member:carol` was three serial round-trips before the search itself could start. They are all the same question - which of these names is an account - so it is asked once, with `$in`, and answered from a map. A name typed under two operators is one lookup now, not two. Unknown names are still reported against the operator they were typed under, because "ann is not a user" is not useful without saying where ann was typed. tests/queryBatching.test.cjs pins both, including the negatives: no per-card read remains in the label handler, no per-username query remains in search, the response order and notFound list are preserved, and the delete handler is still per-card on purpose. Thanks to xet7 ! |
||
|
|
d577f07700 |
Canary tokens: who tried to override permissions, and from where.
The security event log said what a guard DID - a request blocked, a filename
sanitized - which answers "is WeKan defending itself" and not the question an
admin asks next: who did that, and from where. It also could not tell a browser
that got confused from somebody working through the Hall of Fame one entry at a
time.
A CANARY is a tripwire at a point that only a permission-override attempt
reaches. Ordinary use never gets there - the code path runs when a request asks
for something the rules forbid - so a trip is not noise, and it is worth an
admin's attention with the actor attached. Design:
docs/Security/Remediation/WeKan.md §12.
Three properties, each enforced by a test:
SILENT. Tripping one changes NOTHING the caller can observe. tripCanary()
always returns false and tripCanaryDeny() always returns true, so a call site
reads as the refusal it replaces:
if (forbidden) return false; // before
if (forbidden) return tripCanary('card.vote-field', { userId });
The return value is decided before any reporting is attempted and the reporting
is wrapped, so a canary can never throw into, delay or disturb the request it
watches. The REST handler re-throws the ORIGINAL error object. This is not
politeness: a canary that announces itself is a map of which paths are watched,
and a probe would simply avoid them.
BOUNDED. A canary sits where an attacker can loop, so one row per attempt would
be a denial of service they get for free. models/lib/canaryTokens.js - pure, no
Meteor, no clock of its own - records the first trip of a (canary, actor) pair
at once, COUNTS the rest of the window, flushes one summary carrying the total
when the window closes, and stops writing after 60 summaries for a pair that
never gives up. The tracked-pair map is capped at 5000 and evicts the LEAST
RECENTLY seen, so a long-running attacker is not pushed out by a passing one and
a botnet varying its address cannot grow it. Idle pairs are swept on a timer. A
thousand attempts in a minute cost ONE row, and a suppressed trip costs one map
lookup. The username lookup is cached and capped, and neither it nor the insert
is awaited on the caller's path.
ATTRIBUTED. Every event carries userId, username, ip and count. The username is
denormalised at write time on purpose: it is what the account was CALLED when it
tried, so a rename does not rewrite history and a deletion does not erase it.
The address uses the same spoofing-safe resolver as the login throttle -
X-Forwarded-For only as far as HTTP_FORWARDED_COUNT says to trust it - or an
attacker could write a colleague's address into the security log by sending a
header. `detail` says what was attempted in the words of the feature, never the
payload.
Seventeen canaries are wired at the permission checks that refuse the attempts
behind BoardBleed, ParentBleed, ChecklistBleed, PathBleed and CommentBleed, plus
the direct vote/poker field writes and a stored path that points outside the
storage root. All server-side: no Playwright, no browser, nothing to install.
Admin Panel / Problems / Security gains Username, IP address and Attempts
columns, and both new columns are searchable - the thing an admin does with one
security event is pivot on it.
tests/canaryTokens.test.cjs (25 checks) drives the limiter through bursts, an
endless probe, eviction order and junk input; tests/canaryCoverage.test.cjs (18)
pins every canary to its call site and asserts none of them changes what the
caller gets back.
Thanks to xet7 !
|
||
|
|
a8fa6cfa3f |
CommentBleed: the REST API let any board member delete anyone's comment.
Over DDP, deleting a comment is author-or-board-admin, and a board that sets `restrictCommentEditing` takes even the admin's ability away (#5906). That rule was enforced in a CardComments collection hook keyed off the Meteor userId, with an early `if (!userId) return` for the genuine server-internal callers - board copy, cleanup, migrations - that run with no authenticated user. An HTTP request carries no Meteor userId into the invocation context. So DELETE /api/boards/:boardId/cards/:cardId/comments/:commentId which checked only `Authentication.checkBoardAccess` - board MEMBERSHIP - reached the collection with no user, the hook took its "server-internal, trust it" path, and any normal member could delete any comment on the board. HTTP 200, the comment gone, restrictCommentEditing or not, while the same deletion over DDP was correctly refused (CWE-639, CWE-863). Broken object-level authorization: harassment and evidence destruction on a shared board. The fix does not rely on the hook seeing something it cannot see. The handler loads the comment - 404 when there is none - and applies the same rule itself, with req.userId, before removing anything. That rule is now an exported function (`assertCanMutateComment` in models/cardComments.js) that the hooks and the REST handler both call, so DDP and HTTP cannot enforce different things; it carries a 403 statusCode so a refusal answers Forbidden rather than 500. The no-userId path stays, documented for the internal callers it was written for. tests/restCommentDeleteAcl.test.cjs pins that the handler loads the comment, that the ACL runs BEFORE the removal, that membership alone is no longer sufficient, that the DDP hooks still call the same function, and - so a future edit route cannot repeat this - that no REST PUT for comments exists without the same check. Thanks to Alpastx and xet7 ! Fixes GHSA-pqr4-rxgp-hv2m. |
||
|
|
35daaaa279 |
ParentBleed: one card id bridged a private board into another board's feed.
A card's `parentId` may name a card on ANOTHER board, and setting it was authorized only against the CHILD board's write ACL - nothing asked whether the person setting it, or the people subscribed to the child board, were allowed to see the other board at all. The board publication walks the whole ancestor chain, because the 'prefix-with-full-path' subtask setting renders a subtask's complete path (#3453), and it published the complete ancestor card DOCUMENTS to every subscriber of the child board. So a member who could write on shared board B and knew a card id on private board A could point a card at it and have A's card - title, description, custom fields - delivered over DDP to people who are not members of A (CWE-200, CWE-862). Closed at both ends, because either alone leaves half the hole open. The WRITE refuses a parent whose board the actor cannot see. That is one question, asked in one place (server/lib/visibleBoardIds.js) with the same selectors the publication and All Boards use - so an ACTIVE org, team or domain share counts and a revoked one does not. It is enforced on the REST card create, on the REST card update (the PUT the report used), and on DDP by a deny rule covering both insert and update, beside the cross-board MOVE deny that GHSA-gm7v-pc38-53jr added. A parent that does not exist is refused too. Clearing or omitting a parent is untouched. The PUBLICATION sends only the ancestors whose board the subscriber may see. The board being published is its own answer, so a normal same-board subtask path is unchanged; an ancestor on a board the subscriber cannot see is simply not sent, and a chain that yields nothing publishes nothing. This is the shape of the check the linked-card path already made - creating a linked card requires read access to the source card's board - applied to the field that did not have it. tests/crossBoardParentCardLeak.test.cjs pins the filtered cursor, that the unfiltered publish of every ancestor is gone, that both REST paths validate before writing, that the deny rule covers insert as well as update, and that clearing a parent and the pre-existing cross-board move deny still work. Thanks to Alpastx and xet7 ! Fixes GHSA-jvv9-498p-hxrg. |
||
|
|
5b83e8e256 |
Webhooks send the username too, and TODO Later loses three settled entries.
An audit of the TODO Later backlog against the open issues and the current source. Three no longer belong there. #3113 - an outgoing webhook said who did something by DISPLAY name and had no field for the login name. params.user comes from getActivityUserName(), which prefers getName() because the same params feed the e-mail notification text, where "Lauri Ojansivu commented on ..." is what a person wants to read; a webhook consumer needs the identifier, received "Lauri Ojansivu" where it needed "xet7", and matching users by display name is wrong the moment two people share one. Changing what `user` means would break every consumer already reading it, which is what left this recorded as needing a maintainer decision. It needs none: the username travels as its OWN field. `user` is untouched, `username` is beside it in the default WEBHOOKS_ATTRIBUTES list, and a deployment that pinned its own list still gets exactly the fields it asked for. #6542 - "Import finished. Users imported: 60, but only 25 are listed". The Admin Panel People pane paginates and passes its total to the shared table page (totalLabelKey: 'people-number'), so the 60 the importer reported is on screen next to the 25 rows of the current page. That is what the report was about, and it is already true in this source. #6500 - Docker `latest` not loading in a browser: already closed upstream, so it was only sitting in the backlog. The rest of the backlog stays, each with its reason: they need an SMTP server, an LDAP directory, a container, a browser to drag in, or a maintainer's decision on an intended contract - none of which a source reading can settle. tests/webhookUsername.test.cjs pins both halves of the webhook change: that the username is there and set from the same user document as the display name, and that `user` still means what it always did, including the notification text that depends on it. Three of its seven assertions fail on the previous commit. Thanks to xet7 ! Fixes #3113, Fixes #6542. |
||
|
|
50083104c7 |
API: a list says when it changed, and when its cards last did.
#5251 asked for the last change date of a list, to build an offline Android client that syncs only what moved. Neither half existed: GET /api/boards/:boardId/lists returned {_id, title} and no dates at all, and while the single-list endpoint returns the whole document - modifiedAt included - that date answers the wrong question. It moves when the LIST document changes (title, sort, archived); a card being added, edited or archived does not touch it, and those are the changes the client is asking about. The list endpoint now reports both: modifiedAt - the list document itself cardsModifiedAt - the newest change among the cards in it, null when none One query for the board's cards and a reduction in memory, not a query per list - a query per list is what made this expensive enough to ask about. Archived cards are included on purpose: archiving is one of the changes named in the issue. The reduction is models/lib/listActivityDates.js, a pure helper, so it is testable without Meteor and so the handler stays readable. It reads dateLastActivity as well as modifiedAt and takes whichever is newer, because boards written by older WeKan carry only the former; a card with no usable date is skipped rather than counted as now or as zero; and a list whose cards carry no date is ABSENT from the result, so the endpoint reports null rather than an invented time - a client polling on a wrong date either never syncs or syncs forever. tests/listActivityDates.test.cjs exercises the helper directly: newest wins, per list, legacy field, string and numeric dates, an undated card cannot drag the answer backwards, and a negative case feeding it nulls, strings, numbers, a card with no listId and an Invalid Date - none of which may throw, since the handler passes whatever the database holds. It also pins the endpoint's shape: both fields, one cards query, only the three fields it reduces over, and no `archived: false` on that query. Thanks to mimZD and xet7 ! Fixes #5251, |
||
|
|
24927c3a7a |
Moving a card to another board works again, and the REST route cannot corrupt one.
#6572: every cross-board move failed immediately with "Not permitted. Untrusted code may only updateAsync documents by ID. [403]", whether or not the card had any dependencies, and before the move itself ran - so the card stayed put. models/cards.js is isomorphic, so its helpers run in the client bundle, and client code calls card.move() directly (list.js, swimlanes.js, minicard.js, globalSearch.js, sidebarFilters.js). Meteor lets untrusted code update only BY ID - a bare id or an { _id: ... } selector. The cross-board branch of move() cleaned up inbound "Red Strings" (#3392) with a compound selector and multi: true, which is rejected on the client every time, including when it would have matched nothing. addDependency, setDependencyProps and removeDependency in the same file each carry a comment saying updates must be by _id only; this was the one place that did not follow it. The card's own dependencies are still cleared by the move (that rides along in the by-id update). The inbound half - the links pointing AT the card from the board it left - is now a Cards.after.update hook in server/models/cards.js, where a selector is allowed, and being server-side it also covers the REST API and import paths that never called the helper at all. It pulls both stored shapes: { cardId, ... } objects, and the bare id strings older data still holds, which normalizeDependencies hides on read. The issue also reports that the REST workaround corrupts the card, and it does. A PUT of boardId/listId/swimlaneId naming the DESTINATION board is not a board move - isBoardMove needs newBoardId, newSwimlaneId and newListId - so that branch never ran, while the same-board swimlane and list branches did: the card kept its old boardId and got the other board's listId and swimlaneId written onto it, belonging to a list and a swimlane on a board it was not on, showing on neither, undone only by a hand-written database update. Those two branches now verify the target belongs to the board in the URL and otherwise refuse with 400 naming the parameters to use, and they are skipped during a board move - they would rewrite listId before the isBoardMove update, whose selector pins the card's original listId, so that update would match nothing and silently do nothing: the same broken card by another route. tests/cardMoveUntrustedUpdate.test.cjs pins both halves: every Cards update in the isomorphic model is by _id and none is multi-document (it reads the whole call, because multi is the third argument and a check that stopped at the first one could never fail), the inbound cleanup is server-side and keyed on a real board change, and the REST branches are board-checked and skipped during a move. Verified against the previous commit: the model guard reports the compound selector and the multi update, and 6 of the 8 REST assertions fail. Thanks to jullbo and xet7 ! Fixes #6572, |
||
|
|
73a136bedd |
Workspaces nest: drop into one to make it a sub-workspace, and fold the tree.
A workspace held boards and, in the data, other workspaces - but a drag could
only ever say one thing about them, and the fold was not there at all.
WHERE IN A ROW it is dropped is now what the drop MEANS:
the top quarter - it becomes that row's previous sibling
the bottom quarter - it becomes that row's next sibling
the middle half - it becomes that row's LAST CHILD, a sub-workspace
The middle is the biggest target on purpose: reordering can also be reached by
aiming at the neighbouring row's far edge, but nesting has only this one. Coming
back up is a drop like any other - a child dragged onto a root row's edge is a
root again - because nesting has to be undoable or a workspace put one level too
deep is stuck there.
THE PLACEHOLDER IS A SLOT, NOT A LINE. While the pointer is over a row an empty
slot a row high opens above it, below it, or - for "into this one" - INDENTED
underneath it, which is exactly where the workspace will appear. A line between
two rows is a target that has to be aimed at; a slot is a place to drop into.
The slot is a pseudo-element of the row, so the rows below shift down and the
row being aimed at stays where the pointer put it.
A workspace may not be dropped into itself or into its own descendant: the
subtree would be cut off from the root, taking every workspace under it. It is
refused by NOT calling preventDefault(), which is how HTML5 drag and drop says
no, so the cursor refuses while the workspace is still in the air rather than
the drop landing and quietly doing nothing.
AND THE DROP THAT DID NOTHING. With the handles off the drag starts on an
ANCHOR, and a browser puts that anchor's own text into text/plain. The drop read
text/plain first and took the workspace for a BOARD, so it assigned nothing and
the row snapped back - which is why the same drop worked with handles on, where
the drag starts from a span that carries no text. The drag clearData()s before
setting its own type, and the drop decides on the workspace id FIRST.
A CARET FOLDS a workspace's own workspaces away, at the start of the row -
before the drag handle, so the carets of a tree line up whatever the handles
toggle says. It is the control a list has on a board and the one the left menu
itself has, down to the two words in its tooltip, and it answers Enter and Space
because a tree that only opens with a mouse is a tree half the readers cannot
open. A workspace with nothing under it keeps a spacer of the same width, so a
row does not shift sideways the moment it gains its first child.
Open is the default and only the FOLDED ones are stored: a missing key is an
open workspace, so fifty workspaces with two folded is two keys. Remembered in
the same three layers as the rest of this menu - a Session value, then
profile.collapsedWorkspaces, then a cookie for a reader who is not signed in.
The server method takes the id into a DOTTED FIELD PATH and the tree is written
by the client, so the id is checked against ^[A-Za-z0-9_-]{1,64}$ first: one
carrying a `.` or a `$` would address a different field.
The depth is UNLIMITED because nothing counts it: the template draws itself for
a workspace's children, each level indenting by one caret's width with a logical
property, so a right-to-left tree indents from the right by itself.
What a drag does to the tree is a pure module with its own tests -
dropPosition() and moveWorkspace(), the guards included - so the rules can be
proved without a browser, and the page is pinned to calling them rather than
re-deriving them.
Thanks to xet7 !
|
||
|
|
920d42b6db |
The left menu is resized by dragging its inner edge.
The menu's inner edge - the right one while reading left to right, the left one under a right-to-left language - now carries a grip, and dragging it changes the width. It is the same control the right board sidebar has on its own inner edge: the same 6px strip, the same col-resize cursor, the same nodragscroll so a drag resizes the menu instead of panning the page behind it, and the same sign flip on the delta so the widening drag mirrors under RTL rather than needing a second rule kept in step. ONE number, on <html>. The width is a CSS custom property, --wekan-left-menu-width, and everything that needs it reads that: the Admin Panel's menu, the All Boards one - whose grid track is auto, so the track follows the menu - and the grip itself, which sits at calc(width - 3px) from the row's inline start. An inline width on one element could not have done that: the menu is a different element in a different template on each page. The default is the number in the stylesheet, and a breakpoint that wants a different default overrides the VARIABLE, never the menu's width - a rule naming .side-menu would beat a dragged width, which arrives as an inline property on <html>, at exactly that one screen size. For the same reason the client REMOVES the property when nobody has dragged it rather than writing the default into it. The Admin Panel menu's own width was min(250px, 32vw), which only ever resolved to 250px above the 800px breakpoint; it is the shared 260px now, because the two pages draw one menu and a menu has one width. The grip is positioned against the row/grid around the menu, not inside it: the menu is its own scroll area, and a handle within it would scroll away with the entries. Being absolutely positioned it is neither a flex item nor a grid item, so it adds no column and no gap - which is why the shared menu template can carry it as a second root and every Admin Panel pane gets it without naming it. Clamped to 160px..min(600px, window - 240px), with no drag on a phone, where the menu is full width above the content, and none while it is folded, where there is no edge to drag. The All Boards menu also takes max-width:100% now, because the phone rules cap its track at 210px and a fixed width ran out past it. Remembered in the same three layers as the fold: a Session value first, then profile.leftMenuWidth, then the wekan-left-menu-width COOKIE when nobody is signed in - the same cookie mechanism the fold uses rather than the localStorage the right sidebar's width uses, so one reader's menu is not remembered in two different places. Saved once, when the drag ends; while dragging, the property is written directly so the edge follows the pointer without a database write per pixel. The server method clamps again and refuses NaN, which passes check(width, Number) and would otherwise store a width no page could recover from. Thanks to xet7 ! |
||
|
|
5df6f28421 |
Left menus fold away, with the caret a list already has.
At the top of both left menus - All Boards and the Admin Panel - there is now a caret that folds the menu away, and the same caret brings it back. It is the control a list has on a board: pointing down while the thing is open and right once it is folded, with the same two words in its tooltip, so there is nothing new to learn. Folded, the menu is a strip holding only its caret and the page beside it takes the width back. Folded rather than hidden outright: a menu with no way back is a menu you have lost. Everything but the caret goes through a :not() on the caret rather than a list of names, so a row added later cannot be left sticking out of a narrow strip. On All Boards the width moved from the grid track onto the menu itself, because a fixed 260px column would hold the gap open beside a folded menu. One state for both pages: they draw one menu, and a reader who folds it away on one of them has said what they want on the other. It is a Session value first, so the fold is instant rather than waiting for a round trip, then profile.leftMenuCollapsed on the user document, and a cookie when nobody is signed in - a public board has this menu too - through the same cookie helpers the public list and swimlane collapse states already use. One caret template for both menus, so the two cannot drift into two different carets, and the helper that reads the state is global because the panel that takes the class is a different element in a different template on each page. Thanks to xet7 ! |
||
|
|
1f2044219a |
Starred: bookmarks to any page, not only boards.
The star group in the first header bar is a bookmarks menu now: caret, count, star. It held boards only - a board could be starred and reached from the dropdown, and every other page could not, so the one control for "keep this where I can get at it" worked on one kind of destination and was absent on the rest, even though those pages have had their own addresses since the All Boards and Admin Panel URLs landed. The star on any other page stars THAT PAGE. A bookmark is a relative URL and the title from the browser tab: relative so it survives the site moving to another host, and an absolute or protocol-relative URL is refused rather than cleaned up, because the stored value goes into an href the reader clicks. The browser tab now says where you are - "Product name - All Boards / Remaining" - instead of only the product name, so ten open tabs of one WeKan are no longer ten identical tabs and a bookmark of any of them is named after the page. The path is the one the header already computes for the title's tooltip, published through a leaf module rather than worked out twice. In All Boards / Starred the bookmarks are tiles beside the starred boards, with the white border the template-container tile carries, the theme's own colour behind them, and both the title and the URL - the title says where it goes, the address says what it is. Each tile has its own unstar button, because the star in the header stars the page you are on. Dragging a tile past another reorders them, and that is the order of the header dropdown: the two are views of one array. The move matches both ends by URL rather than by index, since the two views are rendered separately and an index from one is a guess about the other. The list is capped at 50, oldest dropped, because it is a dropdown. Documented in docs/Features/Board/Starred.md. Thanks to xet7 ! |
||
|
|
eea1f2ffed |
All Boards: Home, a section for the board that opens after login.
One board can be Home: logging in opens it instead of the All Boards page. That has always existed, set from Multi-Selection's "Set as Home board (opened after login)", but there was nowhere that said which board it was - the setting was write-only, and the only way to find out what you had chosen was to log out. Home is now a section of All Boards with a row in the left menu, a home icon and the word Home, a count beside it, and the address /allboards/home. It is the first row when a Home board is set - it is the board this user starts in - and still there, further down, when none is, because the place to drop a board onto has to exist before there is anything in it. Drop a board on the row to make it Home. A drop replaces rather than toggling: Home holds one board, and a drop that sometimes set and sometimes cleared would depend on state the reader cannot see while dragging. Home is a mark on a board, not a place boards are kept - exactly like a star. The board stays in Remaining, or in its workspace, and appears in Home as well; dragging it out of Home onto any other row takes it off Home and leaves it where it lives. That is why the drag carries where it started. The server accepts only a board the caller is a member of and that is not archived, and clears only the board that is actually theirs. Nothing automatic writes it; Sandstorm's auto-open still persists nothing. Documented in docs/Features/Board/Home.md. Thanks to xet7 ! |
||
|
|
27cfc214b5 |
All Boards / Archive is board icons, and a board can come back by dragging it.
The Archive had a table of its own, which meant the one place you go to bring a board back was the one place multi-selection, dragging and the tile layout did not work. It is drawn with the same board icons every other section uses now, and the differences are the ones that have to be different: no "Add Board" tile, because a board cannot be created already archived, and each tile says WHEN it was archived, which is what tells one old board from another. Four things had to change for that. The section's query asks for archived boards - the one section whose query is the opposite of every other one's - and the menu filter has its own branch for it, because a workspace assignment survives archiving and the workspace branch would have hidden most of an archive. The page subscribes to them, and only while that section is open. The count beside the menu row comes from a method and says how many there are, not what they are. The autorun is placed AFTER selectedMenu and boardSearchVar are assigned: an autorun runs once immediately, so above them it read .get() off undefined and threw during onCreated - which it did, and xet7 saw it. The publication sends what a tile draws. It sent seven fields to a template that reads twelve, which would have rendered grey, nameless tiles. And the board publication no longer withholds an archived board. It excluded one unless it was a template, so following a tile's link answered "board not found". Archived is not a permission: what decides whether the document may be sent is the membership clause beside it, and that is untouched. The isArchived argument still governs the CONTENTS, so an archived board opens showing its live lists. Dropping a board on Remaining brings it back - one board or a whole multi-selection, which is the point of dragging rather than opening each board's own menu. It restores through a new restoreBoard method gated exactly as archiveBoard is: board admin or a global admin. The two must agree, or one of them is the wrong way round, and the guard checks them against each other rather than each against a copy of the rule. Also, from the same screenshots: the home icon and the notification bell now begin a row at the same x - 4px of margin and 6px of padding each, where the bell carried 10px from its own stylesheet and the house 8px - and the space after the username matches the space before the avatar, which it did not on a page whose bar ends with the name because nothing followed it to provide the rest. Thanks to xet7 ! |
||
|
|
2f0445102b |
Remove the "100%" zoom feature from the header.
It scaled the board with a CSS transform, it did not work, and there is no plan to
fix it - WeKan already has a font-size setting (Member Settings / Change Font),
which is what the control was reached for anyway. A control that does nothing is
worse than no control, so it is gone rather than hidden.
What went with it: the pill and its number in the header, the helper and the three
handlers behind it, Utils.getZoomLevel / setZoomLevel / applyZoomLevel and their
three call sites, the `profile.zoomLevel` schema field, its entry in the published
user fields, the model setter and the server method, the `click-to-change-zoom`
translation string, and 57 stylesheet rules spread over four files - header.css,
layouts.css, boardHeader.css and boardsList.css - which is how much of the
stylesheet a broken feature had accumulated.
The card zoom is a DIFFERENT feature and is untouched: getCardZoom / setCardZoom /
applyCardZoom and the +/- buttons in the card header still work.
Three tests existed only to constrain the pill, and each is handled on its own
terms rather than deleted to make the run green:
* uiDensity's "zoom pill fits inside the 28px quick-access row" has nothing left
to measure; it is replaced by a guard that the pill has not come back into any
of the four stylesheets that carried it - it was spread widely enough that a
partial revival is a real risk.
* mobileAllBoardsFit's "the quick-access bar gives way" capped the zoom input at
50px of a 375px phone. The rest of that test - notifications and the user bar
never shrink, because they are what the user came for - is untouched, and the
zoom half is now the same "it has not come back" assertion.
* mobileAllBoardsFit's "the zoom number stays INSIDE its white pill" was a real
bug once (the pill shrank below its contents and the number ended up beside it
in 8px type under the notification bell). There is nothing left to lay out, so
it is removed with a note saying what it used to protect and where the
replacement guard is.
Thanks to xet7 !
|
||
|
|
8e89262d00 |
Fix #6559: the Propagate Members To Boards checkbox passed a selector where an id was wanted.
Ticking "Propagate Members To Boards" for a team in Admin Panel > People > Teams
stored the flag and added nobody. The members only appeared later, when the LDAP
sync cron ran the propagation by its other, correct route.
`setTeamPropagateMembersToBoards(team, value)` receives `team` as the SELECTOR the
client sent - `{ _id: … }`, the same value it hands to `Team.updateAsync` on the
line above - and passed it whole:
await propagateGroupMembersToBoards('team', team);
`propagateGroupMembersToBoards(kind, groupId)` puts that straight into the member
lookup, so it ran
Meteor.users.find({ 'teams.teamId': { _id: 'abc' } })
comparing a string field against an object. It matched nobody, the function
returned early with "0 boards updated, 0 members added", and nothing threw. The
checkbox went green and did nothing.
The org column beside it was identical - `setOrgPropagateMembersToBoards` passed
`org` the same way - and is fixed with it, though the report was about teams.
Both call sites pass the id now, and `propagateGroupMembersToBoards` normalises
whatever it is given at the one point every caller goes through: a plain id, or a
document/selector carrying one. Anything it cannot turn into an id is REFUSED AND
LOGGED rather than quietly treated as a group with no members, because a silent
"0 members added" is exactly how this survived a release. A missing group stays
quiet - propagateAllFlaggedGroupsToBoards may legitimately have nothing to pass.
The select-all checkbox in the column header is the same promise to the admin, and
it did not propagate at all, not even wrongly: setAllTeamsFeature /
setAllOrgsFeature set the flag on every row and stopped. They now propagate when
that field is the one being turned ON, and only for their own kind, so ticking the
team column does not act on the org column beside it.
propagateAllFlaggedGroupsToBoards takes an optional kind for this; the default is
unchanged, so the LDAP cron and the propagateOrgTeamMembersToBoards method still
do both.
The two wiring tests in tests/propagateMembers.test.cjs REQUIRED the buggy calls -
they asserted `propagateGroupMembersToBoards('team', team)` verbatim, pinning that
a call happened without asking whether its argument was right, and so held the bug
in place. They require the id now and fail if the whole selector comes back, and
the normaliser is exercised for real: every shape a caller might hold an id in
resolves to it, a selector with no id resolves to null AND warns, and an absent
group is quiet.
Thanks to ChristianMa97 and xet7 !
Fixes #6559,
|
||
|
|
032722fcc4 |
Security: trust a certificate instead of disabling verification, and escape every metacharacter.
CodeQL alert #430, js/disabling-certificate-validation, High: `reqOptions.rejectUnauthorized = false` in the outgoing-webhook path. It is right, and the switch is gone. `rejectUnauthorized: false` accepts ANY certificate - including the one a man in the middle presents - which is the attack the handshake exists to stop. What #6553 and #6551 actually need is not "verify nothing", it is "this certificate is legitimate", so that is what WeKan takes now: WEBHOOK_TLS_CA_CERT the certificate (or CA) to TRUST for outgoing webhooks MAIL_TLS_CA_CERT the same for the mail server MAIL_TLS_SERVERNAME the name to verify the mail certificate AGAINST, for the wildcard-one-level-short case the report describes Each is the PEM itself or a path to a file holding it. A self-signed certificate is its own issuer, so naming it here is exactly what makes it valid - and verification stays ON, the chain is still checked, the hostname is still checked. A path that cannot be read is not fatal: it logs which setting failed and keeps the system trust store, rather than stopping mail or webhooks. The SSRF protections are untouched: the address is still resolved once and pinned, private ranges are still refused, redirects are still blocked. CodeQL alert #429, js/incomplete-sanitization, High: `helper.replace(/\./g, '\\.')` in a test escaped dots only, so a backslash in the value could change the meaning of the pattern it was spliced into. It uses the same escape-everything helper tests/testsAreRegistered.test.cjs already has, with the backslash escaped FIRST. tests/mailTransportTls.test.cjs now fails if `rejectUnauthorized: false`, that same assignment, or NODE_TLS_REJECT_UNAUTHORIZED appears in either file - so the pattern cannot come back quietly - and covers the certificate-from-PEM, certificate-from-path and unreadable-path cases. Thanks to GitHub CodeQL code scanning and xet7 ! |
||
|
|
75d193d58f |
Fix #6536 impersonate error, and #6538: say when ROOT_URL will send unusable email links.
#6536 - "Impersonate User doesn't work": nothing happened, and the log said "Match error: Expected string, got null". The popup calls the server with the id from its data context, and when there is none it called with `undefined`, which arrives as null and fails the argument check. The client does not call at all without an id now, and says so in the console; the method marks its argument as audited (this app runs with audit-argument-checks) and then answers a missing id with "impersonate: a user id is required" instead of "Match failed", which named neither the method nor what was missing. isImpersonated got the same treatment. The impersonation itself is unchanged, including that only an admin may do it. #6538 - "Bad URL in Wekan mail": the invitation mail contained `http://127.0.0.1/b/...`. Every link WeKan sends is built from ROOT_URL, so when that is left at localhost the mail goes out with the SENDER's own machine in it - unusable for everyone who receives it, with nothing failing and no error to look at. WeKan says it once at startup now, naming the setting and what to set it to, for an unset ROOT_URL and for one pointing at localhost / 127.0.0.1 / [::1]. A warning, not a refusal: a single-machine install where localhost IS the address is perfectly valid. Thanks to ahlgrimma, BastienGraziani and xet7 ! Fixes #6536, Fixes #6538. |
||
|
|
98bce97141 |
Fix #6545 OAuth2 scopes, #6546/#6555 bind IP, #6550 IPv6 database, #6551/#6553 TLS verification.
#6545 - a Keycloak login opened the popup and closed it immediately. The snap's default for OAUTH2_REQUEST_PERMISSIONS was "'openid profile email'" - the single quotes are part of the VALUE - so the scope sent to the provider was `'openid` … `email'`, which no provider knows and a strict one refuses outright. The default has no quotes now, and WeKan normalises the value anyway (models/lib/oauth2Scopes.js: strips surrounding quotes, accepts commas or spaces, drops duplicates), so an install still carrying the old value keeps working without anyone noticing the difference. #6546 / #6555 - there was a mongodb-bind-ip but no way to say where WeKan itself should listen, so it was always Meteor's default of 0.0.0.0 and IPv6 was unreachable. `snap set wekan bind-ip='::'` listens on IPv6 (and on IPv4 through it on a dual-stack host); empty keeps today's behaviour exactly. #6550 - an IPv6 database could not be reached at all: the snap built `mongodb://$MONGODB_BIND_IP:$PORT/wekan`, and an IPv6 LITERAL has to be bracketed - `mongodb://::1:27019/` is not a URL and the driver refuses it. The address is bracketed when it contains a colon, which no hostname and no IPv4 address does; the readiness probe builds its URI the same way, so it can no longer wait forever on a URL that cannot be parsed. #6551 - a mail server whose certificate does not match the name it is reached by ("Hostname/IP doesn't match certificate's altnames" - a wildcard one level too short, an internal CA) could not be used at all, because Meteor builds its transport from MAIL_URL with no say in it. MAIL_TLS_REJECT_UNAUTHORIZED=false installs a transport that connects anyway. #6553 - the same for an outgoing webhook to a server with a self-signed certificate: WEBHOOK_TLS_REJECT_UNAUTHORIZED=false. Both are OFF by default, both are per-purpose, and neither is NODE_TLS_REJECT_UNAUTHORIZED, which would drop certificate checking for everything the server connects to. The webhook switch changes nothing else: the connection is still pinned to the resolved address and private ranges are still refused, so the SSRF protection is untouched - what is given up is only the proof of who is on the other end, for the one endpoint the operator chose. tests/mailTransportTls.test.cjs covers the SMTP option building (ports, smtps, credentials with encoded characters), that only the exact string "false" turns verification off, that nothing is installed unless it is asked for, and that neither file reaches for the global switch. Thanks to lukasjelonek, sysblade, scoopex, 1977er, GuiGuiSoft, marioschulz93 and xet7 ! Fixes #6545, Fixes #6546, Fixes #6550, Fixes #6551, Fixes #6553, Fixes #6555. |
||
|
|
e901ebd3fb |
Fix #6540: every LDAP user became an admin, and #6537: global search over all boards failed.
#6540 - with `ldap-sync-admin-groups` set to ONE group, every user that logged in became a WeKan administrator. Two independent causes. The group query builds `(&(objectclass=group)(member=<the user>))`. The member clause - the one that says WHOSE groups these are - was left OUT whenever the user entry had no value for the configured member format, and the search then ran as `(&(objectclass=group))`, which answers with EVERY group in the directory. So every user "was in" the admin group. (A login restricted by group let everyone in for the same reason.) It now answers with NO groups in that case, names the misconfigured setting in the log, and first tries the usual other spellings of the same value (dn / objectName / distinguishedName). The clause is added after the guard, so it cannot be skipped silently again. The comparison was `LDAP_SYNC_ADMIN_GROUPS.split(',')` matched exactly: "ti, admins" produced " admins" and matched nothing, an unset value produced [''] - one empty string - which matched a group whose name the directory did not return, and Active Directory's case-insensitive names did not match at all. It is one shared rule now (packages/wekan-ldap/server/adminGroups.js): trimmed, case-insensitive, multi-valued names flattened, and an EMPTY configured list can never grant admin. Login and background sync use it, so they cannot drift. #6537 - "Search All Boards" answered "Server Error", with `$nin needs an array` in the log. Two calls in the global-search publication were not awaited, so a PROMISE was handed to Mongo where an array belongs. The `$nin` pair had been fixed; the `$in` pair on the archived/all branch had not. And both id helpers were declared with no parameter while their callers passed a userId, so they asked for the boards of `undefined`: the archived half of a search matched nothing even when it ran. #6544 - the REST route to create a checklist item exists (it did not when that was reported), but every item it created was given `sort: 0`, so a checklist filled over the API came out in an order nobody chose. It appends now, like the UI, and an explicit `sort` in the body still wins. Thanks to karvox, ahlgrimma, frantzstaboeeg and xet7 ! Fixes #6540, Fixes #6537, Fixes #6544. |
||
|
|
c5d13889b6 |
Fix #6465: the three UI bugs reported today - checkboxes, WIP limit, sidebar rows.
WIP-LIMIT POPUP: "the checkbox can not be unchecked and the counter always falls
back to 1". One cause for both. models/lists.js getWipLimit() read the list back
through `ReactiveCache.getList(this._id)`, and on the SERVER that getter is
ASYNC - it returns a promise, and a promise has no `wipLimit` - so the helper
answered 0 for every option, every time. `enableWipLimit` therefore saw value 0
and reset the limit to 1 on every click, and toggled `!enabled` where `enabled`
was always 0, so every click turned the limit ON. The document is `this`, so the
server needs no lookup at all - and a toggle wants the state as it was when the
click happened, not after its own write. The client keeps the lookup: it is what
makes the popup's tick and number follow the change. Apply now also refuses a
limit that is not a usable number instead of sending NaN, which passes
`check(limit, Number)` and dies in the schema with nothing to show the user.
ADMIN PANEL / ATTACHMENTS CHECKBOXES: every checkbox on those panes - Backup's
three, each storage's Enabled and Read, the S3 path-style flag, the avatar-upload
block - drew as a grey rotated RECTANGLE instead of a green tick. They were
native `<input type="checkbox">` styled into WeKan's material checkbox, which
needs the browser to drop its own rendering for `appearance: none`; where it does
not, the geometry applies and the colours do not, which is exactly that
rectangle. They are `.materialCheckBox` divs now, the same markup as the rest of
WeKan, with no native rendering to lose. Two of them could not be unchecked for a
second reason: their state was written as `checked="{{filesystemRead}}"`, a
quoted STRING - and `checked="false"` is checked in HTML.
SIDEBAR CHECKBOX ROWS: "checkboxes and text don't fit well". A row is
`a.flex > i.fa + span`, and `.flex` is only `display: flex` - no alignment, no
gap - so the box glyph touched the first letter of its label and sat on a
different line from it. `align-items: center` and a 6px gap, with a fixed glyph
width so every row's label starts at the same x whether its box is a square or a
tick.
tests/wipLimitPopup.test.cjs and tests/adminAttachmentCheckboxes.test.cjs pin
all of it.
Thanks to Alishara and xet7 !
Fixes #6465,
|
||
|
|
c1add5bc5e |
Paginate the admin lists honestly: one page of ten, index-backed.
Admin Panel / People showed the admin on every one of its 578 pages, and Admin Panel / Problems / Broken cards was one endless page under a pager that said "1 / 1". Same bug in two shapes: the pane subscribes to a publication that sends exactly one page, then reads the page back out of minimongo - which holds far more than the page. The logged-in user's own record is always there (accounts publishes it), and so is every card of every board the admin has opened. A plain find(query) cannot tell those apart from the page. So the server names the page. getPeoplePageIds returns the ids of the People page with the publication's own selector, sort and window; the Broken cards, Cards and Boards report publications send the ids of the page they just sent alongside it. Both panes render that list, in that order, and nothing else. Every paginated page in WeKan now loads ten rows at a time, from one constant - TABLE_PAGE_ROWS_PER_PAGE - including the pages that draw a pager of their own: the reports and event streams, the four People panes, Translation, the search pages and the archive. docs/Design/Page/Table.md records the rule and its two deliberate exceptions. And the counting behind those pagers is index-backed. Every count already asks the database for a count rather than fetching the rows, but several counted and paged on unindexed fields: People sorts users newest-first, so on an instance with 14000 users each page of ten sorted all 14000 first. Broken cards asks an $or over boardId/swimlaneId/listId/type, which uses no index at all unless every branch has one. The missing indexes are created at startup by the idempotent ensureIndex, so an upgrade adds them by itself. Thanks to xet7 ! |
||
|
|
3487d2519d |
One icon set: Font Awesome. The Grey Icons feature is removed.
WeKan used colourful Unicode emoji as its icon set in 8.00-8.24 only; before and after, the icons are Font Awesome 4.7. A handful of emoji had survived that change - every notification type, the board star, the vote-against thumb, the spent-time badge, the reaction and add buttons, the list width toggles, the bookmarks star, the back arrow, the custom-field pencil, the notification bin, the sidebar's plus and hash, the four date badges in cardDate.css and minicard.css, the mobile drag handle, the multi-selection tick, and the gantt day markers. Each of those is a different picture on every platform, at a size and colour the stylesheet does not control. They are Font Awesome glyphs now: either an `i.fa` element, or the codepoint (`content: "\f11e"`) with the font named, since `time::before` is not an `.fa` element. The helpers that produced an emoji return a class name instead, and their templates render an `<i>`. "Grey Icons" in Member Settings existed to grey exactly those emoji. It ran a MutationObserver over every rendered subtree, for the whole session, wrapping any text node that was one of ~50 emoji in a span it could greyscale - and only 13 of those emoji were still anywhere in the app. With them gone it has nothing left to find, so the feature is removed whole: the menu entry, the click handler, the `toggleGreyIcons` method, the `hasGreyIcons` helper, the `profile.GreyIcons` schema field and its published-fields entry, the `userGreyIcons` publication and its subscription, unicode-icons.js/.css and the feature import, twelve `body.grey-icons-enabled` CSS rules across six stylesheets, the `grey-icons` string in all 147 language files, the field in public/api/wekan.yml and wekan.html, and the two mentions in docs/DeveloperDocs. The language flags in the language picker stay: Font Awesome 4.7 has no flags. tests/fontAwesomeIcons.test.cjs fails on an emoji in any template or any CSS `content:`, checks the date badges name the font and use the four codepoints, checks the icon-producing helpers return class names, and checks that no part of the removed feature is left anywhere. Thanks to xet7 ! |
||
|
|
2973240a7f |
Clicking a card closes the one that was open; keeping many open is a setting.
Opening a card APPENDED it to the open-cards list, so the card that was already open stayed open behind the new one - which the reporter saw as soon as the new card was dragged: the old one was still sitting there. Clicking another card means "show me that card", not "show me both". A click now opens THAT card and closes the previous one. Both ways of opening a card - the minicard and its title - go through one helper, so neither path can drift from the other again. Keeping several cards open at the same time is still possible, as the per-user setting it should always have been: Member Settings / "Open many cards at once", off by default, stored as `profile.openManyCardsAtOnce` and toggled by a server method like the settings beside it. A reader who is not logged in gets the default rather than an error. tests/openManyCardsAtOnce.test.cjs replays the decision in both states and guards the wiring: schema, helper, method, menu entry, check mark and translation. Thanks to mimZD and xet7 ! Fixes #6531, |
||
|
|
f15d0c0cba |
Multitenancy: the three tenant modules must be ES modules.
Every app file is an ES module in Meteor, so `module.exports = {…}` in one of
them throws the moment the CLIENT bundle loads it:
Uncaught Error: ES Modules may not assign module.exports or exports.*,
Use ESM export syntax, instead: ./models/lib/tenantAdmin.js
and because it throws, every module after it in the client graph never runs -
models/users.js imports tenantAdmin, so the whole client went down with it.
models/lib/tenants.js, tenantAdmin.js and tenantBackup.js now export with ESM
syntax, and every importer uses import instead of require(). The .cjs unit tests
load them with a dynamic import(), the way tests/cardUrl.test.cjs already loads
its module.
tests/tenantWiring.test.cjs guards both halves, so the same crash cannot come
back quietly.
Thanks to xet7 !
|
||
|
|
36b899b9d6 |
Multitenancy: one WeKan server for many domains, with Organizations as tenants.
Implements option D of docs/Design/Multitenancy/Multitenancy.md, which that document now describes as shipped. An Organization may claim hostnames (Admin Panel / People / Organizations -> Edit), carry its own branding - product name, logos, help link, legal notice and theme colour - and have its own Organization admins, appointed from the row's "..." menu. The request's host picks the Organization; its branding replaces the instance branding for that request, and the client bundle that host serves points its DDP connection back at that host instead of at the one ROOT_URL. An Organization admin administers their own Organization and nothing else: its people, its Organizations row, its theme colour and its backups. They can never grant the site-wide Admin flag, never manage a site admin, and never see another Organization's people or archives. Per-tenant backup and restore is one new control in Admin Panel / Attachments / Backup - Scope. An Organization's archive holds its boards and everything on them plus the attachments those boards use, and no accounts, no instance settings and no org/team documents, because those are shared. A restore may only write to boards that Organization owns: the board ids are the intersection of what the archive claims with what the Organization really owns, every document is checked against that, and "replace all" replaces that Organization's documents rather than everyone's. Admin Panel / Settings / Visibility gains a Change color section above Logo: the site theme, rendered by the SAME shared picker as Board Settings and Member Settings - one template for all three, the way one shared table page serves every table. Its design is the new docs/Design/Page/Theme.md. The order of themes is WeKan's default theme, then the site theme (an Organization's own value on its own hosts), then a user's own override; a board's own colour still owns the board page. All of it is OFF unless the server is started with MULTITENANCY=true (plus MULTITENANCY_TRUST_PROXY_HOST=true when a trusted proxy sets X-Forwarded-Host), so an instance that has never heard of tenants answers exactly as before. One WeKan server per customer remains the supported topology for customers who must not share a process, and the design says plainly what this does NOT isolate. The decisions are three pure modules - models/lib/tenants.js, tenantAdmin.js and tenantBackup.js - so the same rules run on the client, on the server and in the tests. Four new suites pin the separation rather than the plumbing: forged Host headers, cross-tenant queries, privilege escalation and cross-tenant restores. Thanks to xet7 ! |
||
|
|
f0ea1601b3 |
Admin Panel: the board-member restriction moves to Organizations and Teams, as two.
"Add board members only from the same Organization or Team" was one checkbox in the
Login pane - which is where neither of the two things it restricts lives. It is two
checkboxes now, each in the pane it is about:
Admin Panel / People / Organizations [_] Add board members only from the same
Organization
Admin Panel / People / Teams [_] Add board members only from the same Team
A candidate may be added to a board when they share at least one ENABLED kind with
whoever adds them: an Organization when the first is on, a Team when the second is.
With both on that is "an Organization OR a Team" - exactly the rule the single
setting had - so an install that has the old field and neither new one is migrated
to both on first start, and nobody's restriction changes by upgrading. Ticking only
one is the new, narrower choice that was not expressible before.
models/settings.js boardMembersFromSameOrgOnly, boardMembersFromSameTeamOnly
server/models/settings.js the startup migration from the old single field
server/lib/orgTeamRestriction.js
boardMemberRestriction(setting) reads the pair - and
still reads the old field, so an install behaves the
same before the migration runs; canAddUserToBoard()
takes a flag per kind (the old restrictEnabled still
means both)
models/users.js sharesOrgWith / sharesTeamWith, and
sharesRestrictedOrgOrTeamWith(user, restriction)
Enforced in the same three places as before - inviteUserToBoard, the user-search
typeahead that must not offer what the server would reject, and the imported-user
reconciliation - so the two settings cannot drift apart from what the UI says.
Thanks to xet7 !
|
||
|
|
d232194070 |
Admin Panel: the tables fit, every pane has a title, and Version opens first.
Reported one after another, all in the Admin Panel, and they turned out to share
two causes: a stylesheet deciding a table's width from outside the design that
owns it, and a pane having to write for itself what every pane needs.
The tables
* Admin Panel / People / People rendered NOTHING - no table, no search box, no
pager. `buildFilters` and `buildActions` were used in peopleTablePageData but
never imported. That is not a build error: it is a ReferenceError thrown inside
a helper while rendering, which Blaze answers by rendering nothing at all.
Organizations, Teams and Domains use neither function, so they drew normally,
which is what made it look like a People-only problem.
* The right-hand side of a table was off screen - reported on Domains, and just
as true of Admin Panel / Version, where the value column was cut off at the
window edge. Two admin stylesheets forced `min-width: 1200px !important;
width: max-content !important` with nowrap cells on a bare `table` selector.
peopleBody.css had no page in the selector at all, so it reached every table in
WeKan, and `!important` beat the shared table page's own width:100% +
table-layout:fixed. The same rules also made a SHORT table shrink to its
content, which is why Domains sat at a third of the panel on a narrow window.
No admin table is forced wide any more: it fits its panel and its cells wrap,
and the phone-width exception that used to undo the floor is simply the rule at
every width. The shared table page's width and wrapping are `!important` now -
a guarantee a stylesheet in another folder can silently override is not a
guarantee.
* An empty table page rendered no table at all, and the "New" link of
Organizations, Teams, People and Translation is a column HEADER - so an empty
pane had no way to create the first row. The table always renders now; the
"no items" message moved below it.
* The controls row: every control shares one height and no margin. forms.css is
`button { display: block; margin-bottom: 14px }`, written for stacked form
buttons, so a button that kept that margin was centred higher than one that did
not - "Unlock all users" sat lower and shorter than "Teams" beside it, since it
also carried a 20px margin and a 28px height from the old hand-written header.
Action buttons are themed with the pager, in the one stylesheet that owns those
colours, every state spelled out, or a bare <button> falls through to the
forms.css fallback, which is literally black.
Admin Panel / Settings / Translation now renders through the shared table page
(docs/Design/Page/Table.md) instead of a hand-written table: four columns, an
interactive row, the "New" link as a column header. It pages ONE page of 25
server-side with limit/skip and a count method, where it used to grow a window by
infinite scroll; the publication publishes the field it is sorted by, so the
client's sort matches the server's page.
The pane title
Every Admin Panel pane opens with the same heading, and the heading is the ACTIVE
LEFT MENU ENTRY's own label - `paneTitle()` in models/lib/leftMenu.js, one class
`.admin-pane-title`, which the shared table page's own title carries too. Before
this only the paginated table pages had a title at all: Domains said "Domains"
while Login, Announcement, Accessibility, PWA and Version opened with no heading.
Deriving it from the menu is what keeps them identical - a pane cannot end up with
a title of a different size or none at all - and it is why a table page inside the
Admin Panel now passes no titleKey: the section already rendered the heading.
The menus
* Version is the FIRST pane of Admin Panel / Settings and the one that opens with
the page, so what an admin sees first is the version, database and system
information they usually came for. Its page, its one-entry menu and its tab are
gone - a page whose menu had a single entry was a page in name only - and
/information redirects to Settings, the same move Translation made.
* Admin Panel / People: Domains moves up beside E-mail, the settings it is about.
* Admin Panel / Attachments: Backup moves to the top.
Tests: tests/tablePage.test.cjs gains the Translation conversion, the empty-table
header, the one-height controls row, the themed actions and a guard that no admin
stylesheet may force a table's width; tests/leftMenu.test.cjs gains the pane title
(helper, template, every page renders it, one shared size) and Version as the
first Settings pane; tests/translationPane.test.cjs is rewritten for the pane that
is left once the shared design owns the table.
Thanks to xet7 !
|
||
|
|
4009d92ebd |
Admin Panel / Settings: hide-board-activities becomes a global setting in its own pane.
"Don't show the board activities on all boards" was a BUTTON in the Layout pane that called setAllBoardsHideActivities(), which bulk-set showActivities:false on EVERY board document. That was wrong twice over: it overwrote each board's own value for good, so it could never be undone, and it did nothing at all for boards created afterwards. It is now one global setting - Settings.hideBoardActivitiesOnAllBoards - with its own pane, Admin Panel / Settings / Hide board activities on all boards, saved as Yes/No like the other instance-wide switches. The activity feed reads it ONCE, in _showActivities(), before any per-board or per-card value: when it is on, no board shows activities; when it is off, every board's own setting applies again, unharmed. Boards are never written to. The server method is removed rather than left callable. It was unreachable from the UI after this change and its only effect was the destructive write. Also, per the follow-up: the pane previously labelled "Boards visibility" is now just "Visibility". The label points at a NEW i18n key rather than changing the value of tableVisibilityMode, because that key is already translated into 141 languages as "Boards visibility" - editing the English source in place would have left every one of those translations silently saying the old thing. en.i18n.json had no key meaning "Visibility", so one was added; the pane id and its own key are untouched, so the pane's contents keep their translations. Tests: tests/boardsVisibilitySettings.test.cjs now also covers the activities move - its own pane exists, the Layout button and its handler are gone, the save writes ONE global setting and never a board document, a missing radio is skipped rather than saved as false, the schema field exists, and the read side consults the global flag BEFORE any per-board value. Plus the pane label check follows the rename. Thanks to xet7 ! |
||
|
|
a6d9da4e9f |
Board copy: stop the REST route masking a failed copy as HTTP 200, and guard customFields.
The Playwright test "#5592/#5627 copying a board copies its webhooks and rules"
regressed (passed 2026-07-23, failed 2026-07-24 in all three browsers): the copy
returned HTTP 200 whose body was an object instead of the new board id string.
Cause of the MASKING: `POST /api/boards/:boardId/copy` did
`catch (error) { sendJsonResult(res, { data: error }) }`, and sendJsonResult
defaults the status to 200 when no `code` is given — so a copy that THREW was
reported as 200 with the error object as the body, looking like a success. The
catch now returns 500 with the message and logs the stack, so a failing copy is
a clean error (and diagnosable in the server log) instead of a wrong 200.
Also hardens board.copy() itself: the custom-field remap did
`card.customFields.map(...)`, which throws for a card whose customFields is
absent (the schema defaults it to [], but a card copied via `.direct` or seeded
raw can lack it), failing the whole copy. It now skips cards with no
customFields, matching the `!Array.isArray(this.customFields)` guard already used
elsewhere in the model.
The copy code and the card/swimlane/list models are unchanged in the regression
window, so the underlying throw comes from an infra change in that window; the
500 + server-side log above make the exact error visible on the next run.
Thanks to xet7 !
|
||
|
|
5a1a661e01 |
Make the drag-handle toggle work on touch screens, and free the card body for panning.
"Show desktop drag handles" did nothing on a touch screen. The rule was isTouchScreenOrShowDesktopDragHandles() = isTouchScreen() || preference so on touch the OR was already true and the toggle could never hide the handles. Every place that decides whether to render a handle - minicard, list header, swimlane header - and every sortable handle selector goes through that one helper, so the setting was inert on exactly the devices that show handles. The setting is now THREE states, not two: on, off, and never-chosen. An explicit choice always wins (including OFF on a touch screen); only when the user has never chosen does the device decide, and then a touch screen still gets handles by default, because a finger needs something to grab. The rule lives in the pure models/lib/dragHandles.js so it can be unit-tested, and the toggle now stores a real `false` instead of removing the setting - that is what lets "turned off" be told apart from "never chosen". toggleDesktopDragHandles takes the explicit new state from the client (which alone knows whether this is a touch device) and still accepts no argument for older clients. Handles also decide what a DRAG MEANS, and that half was broken too: `.minicard` and `.list-header` carried `nodragscroll` unconditionally, so with handles ON a finger dragging across a card neither moved the card (only the handle does) nor panned the board (dragscroll was opted out) - it did nothing. They now opt out only when handles are OFF, i.e. only when the element IS the drag source. With handles on, the card body pans the board, which is the whole point of having handles. And the handle has to be reachable with a finger: it was a 20-28px icon in the bottom-right corner, a mouse-sized target that is close to unusable on a wall-mounted infoscreen. On a coarse pointer it becomes a 48px full-height strip down the leading edge (the Material minimum, and the easiest edge to thumb), with the card content padded to match. A mouse keeps the compact corner handle, since `pointer: coarse` does not match a mouse. Tab order: the keyboard card/list move buttons are focusable but `opacity: 0` and sit at the START of the card content, so tabbing went card (visible focus) -> invisible -> invisible -> next card and the focus ring kept vanishing and reappearing where it looked like it had gone backwards. They are now revealed while focused, the same pattern the skip-to-content link already uses. Adds tests/dragHandles.test.cjs: the three states, that an explicit OFF hides handles on touch (the reported bug), that an explicit choice always beats the device default, and that a corrupt stored value falls back to the device default rather than leaving a finger unable to drag. Thanks to xet7 ! |
||
|
|
49e576b3c8 |
Add the missing check() calls that made methods throw "Did not check() all arguments".
This app runs with the audit-argument-checks package, so any Meteor method that
RECEIVES an argument it never check()s throws
"Did not check() all arguments during call to '<method>'" - the call fails
entirely, no matter what the method would have done.
problemDetailReport(area) had that defect but nothing had ever passed it an
argument, so it went unnoticed until the new Admin Panel / Problems / CPU usage
header started polling problemDetailReport('cpu') every 5 seconds and the server
log filled with the exception.
Auditing every server method for the same defect found five more that ARE called
with arguments from the client, so these features were failing outright:
- unlockUser(userId) - Admin Panel / People, unlocking a locked-out user
- runBackup(opts, storageName) - Admin Panel / Attachments, running a backup
- restoreBackup(zipPath, mode) - restoring a backup
- saveBackupSchedule(schedule) - saving the backup schedule
- migrateTextDatabase(direction) - the MongoDB <-> FerretDB text migration
and one with no current client caller, getServiceConfiguration(service), fixed
for the same reason.
Each now check()s its arguments against the types its call sites actually pass
(the two optional ones use Match.OneOf(String, null, undefined)), and the three
files that had no check import got one.
Thanks to xet7 !
|
||
|
|
642fa8e93f |
"Map to existing user" now searches every user, not only board members.
After importing a Trello board and choosing to map users later, "Map to existing user" listed only the admin: the picker offered nothing but the ACTIVE REAL MEMBERS of the board, and right after an import the real people have no membership at all - the placeholders do. There was no search box either, so on a board whose only real member is the importing admin there was literally nobody to pick. The picker now has a search box that goes through the same permission-checked `searchUsers` method the normal add-member typeahead uses, so the same board membership check and the same #6116 same-org/team restriction apply. With the box empty it still lists the board's real members (the common case, which changes no roles at all); typing searches every real user and labels the ones who are not on this board yet. Mapping onto a user who is not a board member adds them to the board with the PLACEHOLDER's OWN role - the role the import recorded for that person - never a higher one, and only after passing exactly the checks inviting them would: the Admin Panel "roles allowed to invite" setting, the same-org/team restriction, and the refusal to add a deactivated account. Adding a member with a chosen role is something the board admin doing the mapping can already do through the normal add-member flow, so this grants no capability the caller did not have; an existing active member is still left completely untouched, entry and role. Also fixes sanitizeUserForSearch dropping `profile` from every search result: it read the Mongo-style paths in its allowlist ('profile.fullname') as FLAT keys, so the lookup was always undefined and both this picker and the add-member typeahead showed a blank name with only the username in brackets. Dotted paths are now copied into the same nested shape, still allowlisting exactly the listed leaves. Adds positive and negative unit tests for the new planner contract, including that a comment-only placeholder can never yield an admin, that reactivating an inactive membership does not duplicate the entry, and that the invite policy runs before any write. Thanks to AmigaAbattoir and xet7 ! Fixes #6519, |
||
|
|
f559b751b2 |
#6484: auto-detect the "list disappeared from swimlanes" corruption on board open and repair it with a Product-name-branded progress modal.
When a board opens it now checks (boardListRepairNeeded) whether any list is wrongly bound to a single swimlane (the #6484 corruption, which makes a list vanish from the other swimlanes). If so, and the viewer is a board admin, it runs repairBoardWideLists automatically while showing the shared migration-progress modal, then completes. The check runs once per board, fire-and-forget, and never blocks rendering; on error the board is unmarked so a later open retries. The migration-progress modal is now branded with the configured Product name (Admin Panel / Settings / Layout / Product name, Settings.productName), falling back to WeKan when none is set, via the pure models/lib/productName.js helper — so the repair (and every migration reusing this modal) shows the admin's Product name instead of the hard-coded WeKan brand. Tests: tests/productName.test.cjs (helper + modal-branding source guards) and the extended tests/listUnbindRepair.test.cjs (detection method + client detect/repair/progress wiring) pass. Thanks to xet7 ! |
||
|
|
d35532f0f3 |
Add repairBoardWideLists: un-bind lists corrupted by the #6484 swimlane bug.
The #6484 bug (nudging a board-wide list in swimlanes view bound it to one swimlane and moved its cards there, so it vanished from the other swimlanes) is fixed in code, but boards already hit keep the wrongly-set list.swimlaneId. New board-admin-gated method repairBoardWideLists(boardId) clears swimlaneId back to null for every swimlane-bound list on that board, restoring them to board-wide (rendered under every swimlane). Idempotent (lists already board-wide are skipped), scoped to the one board, and returns the count repaired. The list-selection is a pure, unit-tested models/lib/listUnbindRepair.js. Note: this repairs the LIST binding only; cards the bug moved into one swimlane are not restored (their intended swimlane is unknown -- recover those from a backup). Tests: tests/listUnbindRepair.test.cjs (5 checks) covers listsToUnbind (selects bound lists, idempotent, invalid inputs, non-string swimlaneId) and a source guard that the method is board-admin-gated, uses the helper, clears swimlaneId to null, and is scoped to the board. Thanks to xet7. |
||
|
|
5234d09d15 |
Org/Team: the 'Propagate Members To Boards' flag now actually propagates.
#4737/#5850: the per-org/team orgPropagateMembersToBoards / teamPropagateMembersToBoards flag was stored and shown in the Admin Panel, but the propagateOrgTeamMembersToBoards method that acts on it had NO caller anywhere — dead code, so turning the flag on did nothing. The propagation logic is refactored into exported propagateGroupMembersToBoards(kind, groupId) / propagateAllFlaggedGroupsToBoards() (the Meteor method now delegates to the latter), and the flag setters setTeamPropagateMembersToBoards / setOrgPropagateMembersToBoards now run the propagation for that group when the flag is turned ON. Still strictly add-only (existing board members are never removed/modified) and template boards are skipped; the add-only member computation is extracted to a pure, unit-tested models/lib/propagateMembers.js. Tests: tests/propagateMembers.test.cjs (9 checks) covers membersToAddToBoard (add-only, de-dup, already-member, invalid inputs) and source guards that both flag-setters propagate on enable, the method delegates to the shared impl, and it stays add-only + board-type-only. Thanks to xet7 ! |
||
|
|
c0bbacaf94 |
Due-date reminders: honour hour 0 (midnight) and notify card assignees (#3192).
Two source bugs kept due-date reminder mail from reaching people. (1) The reminder hour was parsed as parseInt(NOTIFY_DUE_AT_HOUR_OF_DAY, 10) || 8, so a configured hour of 0 (midnight) silently became 8 (0 is falsy) and out-of-range hours were accepted; parseNotifyDueHour now keeps 0 and rejects anything outside 0..23. (2) A due-card activity's notification participants were only the card CREATOR and its MEMBERS (server/models/activities.js) -- a user ASSIGNED a card but not a member was never notified about it, including its due date; card.assignees are now included too (still gated downstream by the board tracking level, so nobody who is not tracking is newly emailed). The NOTIFY_DUE_* parsing is extracted to a pure, unit-tested models/lib/dueNotificationConfig.js. Note: the built-in reminder still requires NOTIFY_DUE_DAYS_BEFORE_AND_AFTER to be set, and members/assignees are emailed per their board watch/tracking level. Tests: tests/dueNotificationConfig.test.cjs (12 checks) covers the midnight-hour case, valid/invalid/out-of-range hours, the day-offset window parsing and negatives, plus source guards that cards.js uses parseNotifyDueHour and that assignees are in the notification participants. Thanks to SirConfigMgr and xet7 ! Fixes #3192, |
||
|
|
f79c320d12 |
Fix board-view switch persistence (await) and mobile All Boards 2-per-row grid.
setBoardView Meteor method did not await user.setBoardView(view), so it resolved (and the client reloaded) before profile.boardView was written and a rejected write never surfaced — switching the board view (e.g. to the new Statistics view) was unreliable. Await it. All Boards on phones now lays the board icons out as a real 2-column CSS grid (repeat(2, minmax(0,1fr))) instead of float+width:50%, so at least 2 icons per row is guaranteed regardless of float-logical-value support or how narrow the boards column is (#6488). Thanks to xet7 ! |
||
|
|
96c7faa872 |
Adaptive card loading: auto-lazy for big boards, no admin toggle (#6480)
Card loading is no longer an admin-configurable toggle. WeKan decides
per board by size ('auto', the default): a board over the threshold
(default 500 cards, CARDS_LOADING_LAZY_THRESHOLD) loads only visible
cards via windows; smaller boards keep loading all cards (unchanged,
fully featured). The server computes the mode per board and publishes it
(boardCardsLoadingMode -> boardCardLoadingModes) so client rendering
agrees; isLazyCards is now per-board.
Lazy windows now publish comments/attachments/checklists/checklistItems
with ONE cursor per window instead of one per card (same N+1 fix as
eager mode), and an open card subscribes to its own live children
(openCardData) so it is complete even when outside/just-added-to a
window. Operators can still force CARDS_LOADING=all|lazy|auto.
Removed the Admin/Features card-loading dropdown; pure decision logic in
models/lib/cardsLoading.js (resolveCardsLoadingMode now defaults to
'auto', plus effectiveBoardCardsMode + threshold) with updated unit
tests. New i18n key cards-loading-auto across locales.
|
||
|
|
5d56af56cd |
Board publication: one board-level cursor for comments/attachments, not per-card (#6480)
Opening a board opened one live CardComments cursor AND one Attachments
cursor PER CARD. On a board with many cards that spun up thousands of
live observers; under FerretDB's poll-and-diff that pinned FerretDB/
SQLite CPU (170-300%) and made boards take minutes to open.
Publish comments and attachments with a single board-level cursor each,
on their denormalized boardId / meta.boardId (exactly like checklists) -
one cursor per collection instead of one per card, still reacting to
newly added cards. Add supporting indexes so the board-level queries are
not full scans: cards {boardId, archived}, cardComments {boardId},
attachments {meta.boardId}.
Lazy mode (boardCardsWindow) intentionally keeps per-visible-card
children (bounded by the window), so it is unchanged.
|
||
|
|
6d3c550d8d |
Remove clickable column-header sorting (board Table view + Admin Domains table).
Per request, clickable column-header sorting is removed everywhere it existed: - Board Table view: the sortable `th.js-table-view-sort` headers become plain headers; the sortField/sortDirection state, the sort click handler and the sortIndicator arrow are gone. The table now always shows a stable order (card title ascending). Search + pagination are unchanged. - Admin Panel → People → Domains: same removal; the getDomainsWithUserCountsPage method no longer takes sortField/sortDirection and returns a fixed domain- ascending order (paginateDomains' default). Server-side search + pagination stay. Dead sort-header CSS removed. Guarded in tests/adminReportsPagination.test.cjs. Thanks to xet7 ! |
||
|
|
9f07aa4506 |
Security/speed logging: foundation loggers + first upload/avatar/SSRF wiring.
Implements the core of docs/Security/Remediation/WeKan.md: - models/lib/securityLogFormat.js: pure, unit-testable helpers (dated run-dir path, disk-space guard, one-line format, parse, per-category/Bleed/severity tally, summary render). - models/lib/securityCategories.js: general-category <-> hall-of-fame *Bleed catalog (RedirectBleed, LiveBleed, SourceBleed, MetricsBleed, InviteBleed, ...). - server/lib/securityLog.js + speedLog.js: best-effort, never-throwing writers to WRITABLE_PATH/files/security|speed/YYYY-MM/DD/HH_MM_SS/ (wekan-log.txt + wekan-summary.txt / wekan-speed-*), with a disk-space check before every write and a dropped-events counter. - Wire first remediation/rejection points to emit events: avatar-URL scheme rejection (setAvatarUrl), Trello live-import attachment SSRF block, and avatar localization SSRF block (covers the requested attachment/avatar rejection + sanitization logging). - tests/securityLog.test.cjs (unit + negative tests), wired into test:unit:node. Admin Panel Reports (Security/Speed UI), the FerretDB Go logger, and full guard coverage are the next phase (fully specified in the design docs). |
||
|
|
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 ! |
||
|
|
354b7804b5 |
Right sidebar: drag the edge to resize its width (desktop), saved per user.
Add a resize handle on the sidebar edge, like resizing a spreadsheet column (mirrors the list resize in client/components/lists/list.js). Drag it to change the sidebar width; the width is saved to profile.sidebarWidth for logged-in users and to browser localStorage (wekan-sidebar-width) for anonymous users on a public board, then re-applied on load. - The handle uses the LOGICAL inset-inline-start, so in LTR it is the left edge of the right-docked sidebar and in RTL it is the RIGHT edge of the left-docked sidebar; the drag direction inverts for RTL so dragging always widens/narrows the visible panel correctly. - Desktop only: on phones (<=800px) the handle is hidden and the sidebar stays full width (the 100vw rule is now !important so a desktop inline width can never leak into mobile). - Width is clamped (min 280px, capped near the viewport) and re-applied on window resize so crossing the mobile breakpoint clears/restores it. New profile.sidebarWidth schema field + getSidebarWidth/setSidebarWidth helpers, setSidebarWidth Meteor method, i18n (en, fi), and source-guard test tests/sidebarResize.test.cjs. Thanks to xet7 ! |
||
|
|
bb6b0d5477 |
Member Settings: optional "Submit editors with Enter" (per-user, off by default).
#4236 made every multi-line editor submit only on Ctrl/Cmd+Enter (plain Enter = newline) so titles could be multi-line, but that removed the fast Enter-to-save title workflow some users rely on (v10 email feedback). Add a per-user preference in the Member Settings (Change Settings) popup, saved to profile.submitOnEnter and OFF by default: when on, plain Enter submits the card title, description and other inlined forms, and Shift+Enter inserts a newline; when off, behaviour is unchanged (Ctrl/Cmd+Enter saves). The rule stays in the single pure isSubmitKey(event, {submitOnEnter}); the card title, the card-description override and the shared client/lib/inlinedform.js all route through it and read the preference from the current user. New toggle + helper + toggleSubmitOnEnter method + schema field, i18n (en, fi), and editorSubmitKey.test.cjs extended with positive + negative opt-in cases. Thanks to xet7 ! Related to #4236. |
||
|
|
0535215225 |
Fix add-list: Save did nothing (Match failed) + empty-swimlane + button (#6465).
Two fixes to the #6465 inline Add List composer: 1) Save button did nothing. The inline composer calls createListAfter WITHOUT nextListId, but the server check() used Match.OneOf(String,null,undefined) (not Match.Optional) for it. Meteor check throws "Match failed [400]" on a MISSING object key unless the sub-pattern is Match.Optional, so every inline add-list 400'd. The omittable params (swimlaneId/afterListId/nextListId/type) are now Match.Optional, so callers may omit them. 2) Empty swimlane/board now shows a + button, and the create-list form appears only after clicking it (a swimlane that already has lists keeps using the per-list-header add-list button — no + button needed). The reveal is scoped to the clicked swimlane via a wekan-add-list-empty Session flag, cleared on save/close. Tests: models/lib/createListParams.js + tests/createListParams.test.cjs mirror the method's param contract (incl. Meteor's missing-key rule) with the exact client shapes + negatives, and a source guard that the check uses Match.Optional; tests/upcomingUiGuards.test.cjs gains guards for the empty-state + button reveal. Wired into test:unit:node. |
||
|
|
22c7d5376b |
Member Settings / Font / Color: custom text + background color (#4759).
The Font popup now has a color wheel for the text color and one for the text background color, each with an Unset button to go back to default. Values are free choices (native <input type=color>), validated server-side as #rrggbb hex (models/lib/uiFonts isHexColor6) so only a strict hex ever reaches a CSS value — no injection surface. An unset/invalid value clears that color. - profile.uiTextColor / profile.uiTextBgColor schema (hex-validated) + getters; setUiColors(textColor, bgColor) method ($set valid hex, $unset otherwise). - changeFontPopup: two color wheels + reset buttons; live preview reflects font, size, text color and background color. - Applied UI-wide via --wekan-ui-text-color / --wekan-ui-bg-color CSS variables + has-ui-text-color / has-ui-bg-color body classes (uiFont.js + uiFont.css). - i18n text-color / text-background-color; tests extended (hex + negatives + source guards). Part of #4759. |