mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 10:48:06 -05:00
v11.21
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
8ec78bb14c |
Archived cards stay archived, and a silent watch button says why.
Three email reports, 2026-08-13. "PREVIOUSLY ARCHIVED CARDS (SOME SEVERAL YEARS OLD) HAVE REAPPEARED. THESE CARDS HAVE INCORRECTLY BEEN PLACED IN THE TOP SWIMLANE." The schema upgrade's swimlane rescue treated "this card's swimlane is archived" as breakage and moved the card to the board's first VISIBLE swimlane. But archiving a swimlane is how a whole swimlane is put away: its cards stay where they are, archived: false, hidden because the swimlane is hidden. So every card anybody had ever archived that way was hoisted back into view, years later, in the top swimlane. A card is orphaned when its swimlane does not EXIST, or belongs to another board - #1959, which is still rescued. loadVisibleSwimlanes now also returns existsById, and both the check and the write use it. #1971, the issue the sweep cited, is about cards ADDED in List view landing in an archived swimlane, and that is fixed where cards are created: getDefaultSwimline() picks a non-archived swimlane. It never needed a sweep over data somebody archived on purpose. The two guards that pinned the sweep now pin the opposite, with the reason in them. "SILENT DOES NOT RESPOND. IF WE TRY TO CHANGE IT DOES NOT CHANGE. NOTHING HAPPENS." (the board's Change watch popup) Driven against a running WeKan, the popup works for a board MEMBER - level written, check mark moved, popup closed - and does nothing at all for anybody who reaches the board another way: login as non-member admin: ok watch -> ERROR error-board-notAMember A board is shared four ways: membership, an organisation, a team, and (#5850) an email domain. Only the first puts anybody in `members`, and the watch method asked hasMember(). Everyone sharing through an org, a team or a domain could open the board, see the button, and be refused the moment they used it. It now asks whether the user may SEE the board, through the same boardVisibilitySelectors the publications use, so a watch can never be granted where the board is not visible - and a revoked share (isActive: false) still is not. The other half is why nobody could tell: the popup closed on success and did NOTHING otherwise, so a refusal was indistinguishable from a dead button. It reports the reason now - the watch feature being off in the Admin Panel, or the board not being visible - and en.i18n.json gains error-watch-disabled, which was thrown but never translated. The click also reads its level with String(), since Blaze can hand back a boxed String that `typeof x === 'string'` refuses. Thanks to xet7 ! |
||
|
|
32b61f186f |
Checklists: "Show on minicard" is an override, so unchecking it hides the checklist.
Reported by email with a screenshot (Swedish): "Även om jag avmarkerar 'Visa på minikort' (och vill dölja checklistan på minikortet)" - the switch is off and the checklist is on the minicard anyway. It was off for everybody. The minicard asked: board.allowsChecklistsOnMinicard || checklist.showChecklistAtMinicard and the board flag defaults to TRUE. An OR cannot be argued with: while the board setting is on, no value of the checklist's own field changes the answer. The popup made it look like a working switch - it drew the state from the raw field, which starts false, so it read OFF beside a checklist that was plainly showing, and clicking it wrote true and changed nothing visible. Clicking again wrote false and changed nothing either. Dead in both directions, which is exactly what the screenshot shows. The two settings are a DEFAULT and an OVERRIDE, not two ways of saying yes: showChecklistAtMinicard === true -> shown, whatever the board says showChecklistAtMinicard === false -> hidden, whatever the board says showChecklistAtMinicard undefined -> follow the board's default An override needs three states, so the field loses `defaultValue: false`: with every checklist born false, "hidden" and "not chosen" are the same value and the override cannot exist. models/lib/minicardChecklistVisibility.js is the one rule, used by the minicard, the popup's switch and the toggle - and the toggle now flips what is ON SCREEN rather than the raw field, because flipping the field is what made the first click do nothing. Checklists written under the old default carry a false that meant "follow the board". Left alone under the new reading it would mean "hide this one" and every checklist would vanish from every minicard - the mirror image of the bug. The schema-upgrade step checklist-minicard-unset clears exactly those, and it is the one step there that must run ONCE EVER rather than once per version: afterwards a stored false is somebody's choice, and re-running would put their checklists back. It keeps its own marker beside the schema-upgrade one for that. tests/minicardChecklistVisibility.test.cjs covers the reported case, the opposite one, that two clicks return to the board default, and that only true and false are opinions - a string, a number or a null from an old REST client or a bad import must not quietly mean "hide". tests/schemaUpgradeSteps.test.cjs gains the step, including the negative: after it has run, a false set by a person survives the next release. Verified by running both suites and the whole node suite (377 suites, 0 failed). Not verified in a browser: this sandbox has none. Thanks to xet7 ! |
||
|
|
2f7b49d8de |
Fix FerretDB migration non-finite doubles, LDAP email mapping, and export listener leak.
#6481 (Nissulya): after MongoDB 3.x -> FerretDB v1 migration, cards with a non-finite `sort` (±Infinity / NaN, written by old WeKan before #6472) failed to insert: FerretDB/SQLite rejects non-finite doubles ("invalid value { sort: +Inf } (infinity values are not allowed)"), aborting the document and leaving boards stuck on the loading spinner. sanitizeNonFinite() only made the bare mongoexport tokens PARSE; the parsed value was still a JS Infinity/NaN. Added clampNonFinite() in the migration tool to reset every non-finite number to a finite 0 before insert, and a `nonfinite-sort-repair` startup schema-upgrade step that heals the same corruption in an already-running database (MongoDB or FerretDB), using a predicate built from finite literals only so it is safe on FerretDB too. #6481 (Nissulya): LDAP `mail` -> `email` fieldmap returned `undefined` (worked in 6.09). getDataToSyncUserData's email branch read the mapped attribute case-SENSITIVELY (ldapUser.hasOwnProperty / ldapUser[field]) while the rest of wekan-ldap uses the case-insensitive getLDAPValue(); a directory returning the attribute with a different case (exposed by ldapjs -> ldapts, which preserves the server's case) missed it. The email branch (and the addLdapUser fallback) now read via getLDAPValue(). #6480 (uusijani): board/CSV export paused on socket backpressure with `res.once('drain', resolve); res.once('error', reject)`, which leaked one 'error' listener per backpressured write ("MaxListenersExceededWarning: 11 error listeners added to [ServerResponse]"). writeWithBackpressure() now removes both listeners once either settles. Added tests and negative tests for all three fixes. Thanks to Nissulya, uusijani and xet7 ! Fixes #6480, Fixes #6481. |
||
|
|
be6ebb2503 |
Fix CodeQL js/biased-cryptographic-random in schema upgrade randomId.
256 is not a multiple of the 55-character id alphabet, so the plain byte % 55 mapping skewed generated document ids toward the first characters. randomId now uses rejection sampling: bytes at or above the largest multiple of the alphabet size (220) are discarded and resampled, so every character is equally likely. Ids stay Meteor-style 17-char and exact-length for custom lengths. Resolves code scanning alert #422. Tests: tests/schemaUpgradeSteps.test.cjs gains a rejection-sampling guard (negative case pins that out-of-range bytes are never wrapped). Thanks to xet7. |
||
|
|
9ddbc777dd |
Startup schema upgrade, self-healing attachments, migration speed; fix
#5695 #4897 #4654 #5174 #4825 #5659 #4730 #4419 #4158 #4560 #4036
#1959 #1971.
- Startup schema upgrade (server/lib/schemaUpgradeSteps.js): on start,
check that data from EVERY old WeKan version is migrated to the newest
structure and migrate only what is missing - all platforms, MongoDB and
FerretDB. Version-gated (marker stores WeKan version + datetime of the
last re-check; one findOne per boot until a new release), non-blocking,
live dashboard at /schema-upgrade-status showing the product name, fast
on big databases (distinct() set-joins, updateMany batches). Steps:
archived-flag backfill, swimlane structure + visibility rescue
(#1959 #1971: cards under deleted/archived/foreign swimlanes reassigned
to a visible swimlane; card-insert hook validates supplied swimlaneIds),
merge-per-swimlane-lists (v7.98/v8.0x list copies merged back into
shared lists: no duplicate columns in Lists view, everything visible in
Swimlanes view, cards keep their swimlane), embedded checklist items,
customFields boardIds, allows* backfills, members isActive, permission
lowercase, filesystem path healing.
- Migration speed (5-hour reports): insertMany batches in the text phase,
preloaded target-record maps in the file phases.
- Snap attachment-repair + FILES_ONLY importer mode (see prior commit
wiring) extended with CFS FileSystem-store coverage
(ATTACHMENTS_STORE_PATH era), missing-binary reporting, and
migrate-gridfs-to-fs.mjs bucket fixes.
- OAuth2/OIDC: OAUTH2_LOGIN_STYLE=redirect honored (#5695); concurrent
logins no longer contaminate each other's user data (#4897); account
merge no longer wipes avatars/templates (#4560).
- LDAP: background sync fixed (#4654), password login rejected after LDAP
migration (#4419), LDAP_ENCRYPTION=true actually encrypts (#4158),
group filter accepts multiple groups and admits admin-sync groups
(#4036).
- All Boards tiles: per-list card counts + member avatars restored
non-reactively (#5174 #4825). Uniform default list widths (#5659).
Declined invitations no longer resurrect membership (#4730).
- Tests with negative cases for every fix (tests/*.test.cjs; suite green
except the pre-existing environment-only htmljs failure).
Closes #5600: OAUTH2_CA_CERT already works - the fetch migration
(
|