mirror of
https://github.com/wekan/wekan.git
synced 2026-11-09 14:45:00 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc698806b2 | ||
|
|
0556f01030 | ||
|
|
b379a02631 | ||
|
|
c3f12b5659 | ||
|
|
ea53de4985 | ||
|
|
214b20e7ad | ||
|
|
0f89ad07b8 | ||
|
|
3fb9e4d1be | ||
|
|
5ca5b00a98 | ||
|
|
6cc84a07cd | ||
|
|
a7ace18af8 |
No files matched your search
@@ -4714,7 +4714,7 @@ jobs:
|
||||
with:
|
||||
snapcraft-args: pack
|
||||
|
||||
- name: Refresh stale managed APT indexes after a package 404
|
||||
- name: Refresh managed APT after a package 404 or a failed apt update
|
||||
if: steps.build-first.outcome == 'failure'
|
||||
run: sudo -u "$(id -un)" -E python3 "$GITHUB_WORKSPACE/releases/snap-refresh-managed-apt.py"
|
||||
|
||||
@@ -5610,7 +5610,7 @@ jobs:
|
||||
snapcraft-args: pack
|
||||
path: variant
|
||||
|
||||
- name: Refresh stale managed APT indexes after a package 404
|
||||
- name: Refresh managed APT after a package 404 or a failed apt update
|
||||
if: steps.build-first.outcome == 'failure'
|
||||
run: sudo -u "$(id -un)" -E python3 "$GITHUB_WORKSPACE/wekan/releases/snap-refresh-managed-apt.py"
|
||||
|
||||
|
||||
@@ -124,6 +124,93 @@ its reason.
|
||||
|
||||
</details>
|
||||
|
||||
# v13.04 2026-11-09 WeKan ® release
|
||||
|
||||
**In short:** **ListLockBleed** is fixed: when a list refuses a role write
|
||||
access, that refusal now also holds for the checklist and checklist-item REST
|
||||
routes. The **Sandstorm** and **Android** bundles retry their npm install when
|
||||
github.com is briefly unavailable.
|
||||
|
||||
This release fixes the following CRITICAL SECURITY ISSUE of [ListLockBleed](https://wekan.fi/hall-of-fame/listlockbleed/):
|
||||
|
||||
<details>
|
||||
<summary><a href="https://github.com/wekan/wekan/commit/214b20e7ad">A list that refuses a role write access refuses its checklist REST writes too</a>. Thanks to tsurutanmen and xet7.</summary>
|
||||
|
||||
[ListLockBleed](https://wekan.fi/hall-of-fame/listlockbleed/),
|
||||
[GHSA-4734-8vrg-8j3w](https://github.com/wekan/wekan/security/advisories/GHSA-4734-8vrg-8j3w).
|
||||
A board admin can refuse a role write access in one list (#4527). The card
|
||||
and comment REST routes and the DDP checklist writes applied that refusal,
|
||||
but the six checklist and checklist-item REST routes asked only the board. A
|
||||
member the list refused could therefore still create, rename, tick and delete
|
||||
the checklists of its cards with an API token. Those routes now ask the
|
||||
card's list and answer 403, and the refusal shows in Admin Panel / Problems.
|
||||
`tests/listPermissions.test.cjs` fails for any REST write route of the tree
|
||||
that names a card without asking its list. And
|
||||
`tests/playwright/specs/list-lock-checklists.e2e.js` replays the six writes
|
||||
against a running server.
|
||||
|
||||
</details>
|
||||
|
||||
and fixes the following bugs:
|
||||
|
||||
**Release builds** - what the release workflow does when a download fails.
|
||||
|
||||
<details>
|
||||
<summary><a href="https://github.com/wekan/wekan/commit/c3f12b5659">The Sandstorm and Android bundles retry their npm install through a GitHub outage</a>. Thanks to xet7.</summary>
|
||||
|
||||
v13.03's Sandstorm .spk failed with "npm error 504 Gateway Time-out" for
|
||||
github.com's `meteor/node-source-map-support` tarball: the same kind of
|
||||
outage `releases/npm-retry.sh` has retried since v10.86. That install in
|
||||
`releases/sandstorm-slim-spk.sh`, and the Android bundle's server and sharp
|
||||
installs, ran npm without it, because `tests/npmRetry.test.cjs` read only
|
||||
`release-all.yml`. All three go through the retry now. The test follows
|
||||
every `releases/` script a workflow runs and fails on a bare npm install in
|
||||
any of them.
|
||||
|
||||
</details>
|
||||
|
||||
Thanks to above GitHub users for their contributions and translators for their translations.
|
||||
|
||||
# v13.03 2026-11-09 WeKan ® release
|
||||
|
||||
**In short:** The amd64 **snaps** no longer fail the release when the Ubuntu
|
||||
archive is briefly unreachable: the build waits for it and retries once.
|
||||
|
||||
This release fixes the following bugs:
|
||||
|
||||
**Release builds** - what the release workflow does when a build fails.
|
||||
|
||||
<details>
|
||||
<summary><a href="https://github.com/wekan/wekan/commit/a7ace18af8">The amd64 snaps wait out an Ubuntu archive outage instead of failing</a>. Thanks to xet7.</summary>
|
||||
|
||||
v13.02's native amd64 snap and both amd64 snap variants failed within eight
|
||||
minutes of each other with "Failed to refresh package list: failed to run apt
|
||||
update" while Snapcraft installed build-packages; the arm64 snaps, served by
|
||||
`ports.ubuntu.com`, built. `releases/snap-refresh-managed-apt.py` recovered
|
||||
only a stale `.deb` 404, so the one guarded retry never ran. It now also
|
||||
recognises a failed apt update in the managed build instance, retries
|
||||
`apt-get update` there with a 30/60/120/240 s backoff, and lets the Snapcraft
|
||||
retry run only once the archive answers; a longer outage stays fatal. It
|
||||
prints apt's own error lines first, so a failing job says why apt failed.
|
||||
`tests/snap-managed-apt.py` pins the recovery, its bound, and that unrelated
|
||||
failures are still refused.
|
||||
|
||||
</details>
|
||||
|
||||
and has the following developer-tooling fix:
|
||||
|
||||
<details>
|
||||
<summary><a href="https://github.com/wekan/wekan/commit/6cc84a07cd">The security regression inventory counts UnassignedArchiveBleed as guarded</a>. Thanks to tsurutanmen and xet7.</summary>
|
||||
|
||||
`tests/securityRegressionCoverage.test.cjs` failed once the Hall of Fame
|
||||
published UnassignedArchiveBleed, because its inventory did not have the name.
|
||||
It is guarded now by `tests/assignedCardMethods.test.cjs` and
|
||||
`tests/playwright/specs/assigned-card-methods.e2e.js`, which name it.
|
||||
|
||||
</details>
|
||||
|
||||
Thanks to above GitHub users for their contributions and translators for their translations.
|
||||
|
||||
# v13.02 2026-11-09 WeKan ® release
|
||||
|
||||
**In short:** **UnassignedArchiveBleed** is fixed: a member with the
|
||||
|
||||
+16
-22
@@ -5,6 +5,22 @@ each one changed and the project status are in
|
||||
Written by `node releases/changelog-short.mjs` from CHANGELOG-big.md:
|
||||
make changes there.
|
||||
|
||||
# v13.04 2026-11-09 WeKan ® release
|
||||
|
||||
**ListLockBleed** is fixed: when a list refuses a role write
|
||||
access, that refusal now also holds for the checklist and checklist-item REST
|
||||
routes. The **Sandstorm** and **Android** bundles retry their npm install when
|
||||
github.com is briefly unavailable.
|
||||
|
||||
[All changes in v13.04](CHANGELOG-big.md#v1304-2026-11-09-wekan--release)
|
||||
|
||||
# v13.03 2026-11-09 WeKan ® release
|
||||
|
||||
The amd64 **snaps** no longer fail the release when the Ubuntu
|
||||
archive is briefly unreachable: the build waits for it and retries once.
|
||||
|
||||
[All changes in v13.03](CHANGELOG-big.md#v1303-2026-11-09-wekan--release)
|
||||
|
||||
# v13.02 2026-11-09 WeKan ® release
|
||||
|
||||
**UnassignedArchiveBleed** is fixed: a member with the
|
||||
@@ -32,25 +48,3 @@ API documentation** spells the name **WeKan**, so the API pages published on
|
||||
wekan.fi pass its brand-spelling check again.
|
||||
|
||||
[All changes in v13.00](CHANGELOG-big.md#v1300-2026-11-07-wekan--release)
|
||||
|
||||
# v12.99 2026-11-06 WeKan ® release
|
||||
|
||||
The **mac-arm64** release bundle builds again: its job asked for
|
||||
GitHub's retired **macos-14** runner and was cancelled in the v12.98 release
|
||||
run. The **weba** instructions now live in the weba repository itself.
|
||||
|
||||
[All changes in v12.99](CHANGELOG-big.md#v1299-2026-11-06-wekan--release)
|
||||
|
||||
# v12.98 2026-11-06 WeKan ® release
|
||||
|
||||
**GroupLinkBleed** is fixed: a board admin can no longer skip the
|
||||
board methods by writing the board directly, to attach an organization or team
|
||||
they do not belong to or to add a member past the invitation checks.
|
||||
**Public board CSV and TSV exports** honour the selected columns, and the REST
|
||||
**card archive, restore and custom-field** endpoints answer an unmatched card
|
||||
with a JSON 404 instead of 500, and a REST **card update** can set sort 0, turn
|
||||
overtime off and clear a description. The **notifications drawer** gets its
|
||||
attachments again, and the developer instructions cover the **weba** Gambas
|
||||
companion repository.
|
||||
|
||||
[All changes in v12.98](CHANGELOG-big.md#v1298-2026-11-06-wekan--release)
|
||||
+1
-1
@@ -38,7 +38,7 @@ FROM --platform=$BUILDPLATFORM debian:trixie AS bundle
|
||||
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
ARG VERSION=13.02
|
||||
ARG VERSION=13.04
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY --chmod=755 releases/check-telemetry.py /tmp/check-telemetry.py
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
|
||||
appVersion: "v13.02.0"
|
||||
appVersion: "v13.04.0"
|
||||
files:
|
||||
userUploads:
|
||||
- README.md
|
||||
|
||||
@@ -10,7 +10,7 @@ This is without container (without Docker or Snap).
|
||||
|
||||
Right click and download files 1-4:
|
||||
|
||||
1. [wekan-13.02-win64.zip](https://github.com/wekan/wekan/releases/download/v13.02/wekan-13.02-win64.zip) or newest available at https://github.com/wekan/wekan/releases/
|
||||
1. [wekan-13.04-win64.zip](https://github.com/wekan/wekan/releases/download/v13.04/wekan-13.04-win64.zip) or newest available at https://github.com/wekan/wekan/releases/
|
||||
|
||||
2. [node.exe](https://nodejs.org/dist/latest-v26.x/win-x64/node.exe)
|
||||
|
||||
@@ -22,7 +22,7 @@ Right click and download files 1-4:
|
||||
|
||||
6. Double click `mongodb-windows-x86_64-7.0.34-signed.msi` . In installer, uncheck downloading MongoDB compass.
|
||||
|
||||
7. Unzip `wekan-13.02-win64.zip` , inside it is directory `bundle`, to it copy other files:
|
||||
7. Unzip `wekan-13.04-win64.zip` , inside it is directory `bundle`, to it copy other files:
|
||||
|
||||
```
|
||||
bundle (directory)
|
||||
|
||||
@@ -235,6 +235,10 @@ const CATALOG = {
|
||||
// GHSA-6xqf-jh8x-4wxc: an assigned-only member archiving or converting a card
|
||||
// not assigned to them through archiveSelectedCards / createBoardFromCard.
|
||||
'authz.assigned-card-write': { category: 'authz', bleed: 'UnassignedArchiveBleed', severity: 'medium', cwe: 'CWE-863' },
|
||||
// GHSA-4734-8vrg-8j3w: a REST write in a list whose exception refuses the
|
||||
// caller's role (#4527). The web UI offers no such write, so it is the lock
|
||||
// being stepped round with a token. Medium: recorded, never disables.
|
||||
'authz.list-locked': { category: 'authz', bleed: 'ListLockBleed', severity: 'medium', cwe: 'CWE-863' },
|
||||
'authz.tenant': { category: 'authz', bleed: 'TenantBleed', severity: 'medium', cwe: 'CWE-862' },
|
||||
'authz.search-session': { category: 'authz', bleed: 'SessionBleed', severity: 'medium', cwe: 'CWE-639' },
|
||||
'authz.database': { category: 'authz', bleed: 'DatabaseBleed', severity: 'high', cwe: 'CWE-863' },
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "wekan",
|
||||
"version": "v13.02.0",
|
||||
"version": "v13.04.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "wekan",
|
||||
"version": "v13.02.0",
|
||||
"version": "v13.04.0",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wekan",
|
||||
"version": "v13.02.0",
|
||||
"version": "v13.04.0",
|
||||
"description": "Open-Source kanban",
|
||||
"private": true,
|
||||
"repository": {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf8" />
|
||||
<title>WeKan REST API v13.02</title>
|
||||
<title>WeKan REST API v13.04</title>
|
||||
<!-- needed for adaptive design -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
@@ -484,11 +484,11 @@ data-styled.g658[id="sc-hHttOM"]{content:"dKSNwp,"}/*!sc*/
|
||||
|
||||
<body>
|
||||
|
||||
<div id="redoc"><div hidden=""><script>try{var m=localStorage.getItem("redoc.colorMode");if(m!=="light"&&m!=="dark")m=matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";document.documentElement.classList.add(m)}catch(e){}</script></div><div style="--navbar-height:0px;--navbar-stack-height:0px" class="sc-kIbBWU fFQMWf"><div class="sc-cjUTkN dGsweu menu-content"><div class="sc-jqwVmx jjzLa-d"><div data-testid="search-trigger" class="sc-cToEys dffrbr"><div class="sc-cRcubC ddjiE"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" data-component-name="icons/SearchIcon/SearchIcon" class="sc-cHazmW gTzQi"><path d="M14.5 13.7931L10.724 10.017C11.6313 8.9277 12.0838 7.5305 11.9872 6.11608C11.8907 4.70165 11.2525 3.37891 10.2055 2.423C9.15857 1.4671 7.78336 0.951637 6.36602 0.983845C4.94867 1.01605 3.5983 1.59345 2.59582 2.59593C1.59335 3.5984 1.01595 4.94877 0.983738 6.36612C0.95153 7.78347 1.46699 9.15867 2.4229 10.2057C3.3788 11.2526 4.70155 11.8908 6.11597 11.9873C7.53039 12.0839 8.92759 11.6314 10.0169 10.7241L13.793 14.5001L14.5 13.7931ZM2.00001 6.50012C2.00001 5.6101 2.26393 4.74007 2.7584 4.00005C3.25286 3.26003 3.95567 2.68325 4.77794 2.34266C5.6002 2.00207 6.505 1.91295 7.37792 2.08658C8.25083 2.26022 9.05266 2.6888 9.68199 3.31814C10.3113 3.94747 10.7399 4.7493 10.9135 5.62221C11.0872 6.49513 10.9981 7.39993 10.6575 8.22219C10.3169 9.04446 9.7401 9.74726 9.00008 10.2417C8.26006 10.7362 7.39003 11.0001 6.50001 11.0001C5.30694 10.9988 4.16312 10.5243 3.31949 9.68064C2.47587 8.83701 2.00133 7.69319 2.00001 6.50012Z"></path></svg><span>Loading...</span></div></div></div><div class="sc-dNLPWG dtcefb"><ul data-component-name="Menu/Menu" class="sc-kBPbfe ctPApS"><div data-component-name="Menu/MenuItem" class="sc-gwVKcS fGSWQx menu-item-type-default" role="listitem"><a class="sc-iJONRL iBHKJo" href="/" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="true" class="sc-epufQc fYmDZR"><div class="sc-boLXHU jshptd"><span class="sc-bcyEQV hrIrOF"><span data-text="WeKan REST API" class="sc-eStdmu iyAVQU">WeKan REST API</span></span></div></li></a></div><div data-component-name="Menu/MenuItem" class="sc-gwVKcS fGSWQx menu-item-type-default" role="listitem"><a class="sc-iJONRL iBHKJo" href="/section/production-security-concerns" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-epufQc itBMtf"><div class="sc-boLXHU jshptd"><span class="sc-bcyEQV hrIrOF"><span data-text="Production Security Concerns" class="sc-eStdmu liVEkC">Production Security Concerns</span></span></div></li></a></div><div data-component-name="Menu/MenuItem" class="sc-gwVKcS fGSWQx menu-item-type-group" role="listitem"><a class="sc-iJONRL iBHKJo" href="/login" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-epufQc hKPPiy"><div class="sc-jokKPH jtaKKl"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-default" data-component-name="icons/ChevronRightIcon/ChevronRightIcon" class="sc-iUlCMS kEEIsB"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-boLXHU jshptd"><span class="sc-bcyEQV hrIrOF"><span data-text="Login" class="sc-eStdmu liVEkC">Login</span></span></div></li></a><div style="display:none;height:0px;overflow:hidden" class="sc-hgJgCR dlNiXx"></div></div><div data-component-name="Menu/MenuItem" class="sc-gwVKcS fGSWQx menu-item-type-group" role="listitem"><a class="sc-iJONRL iBHKJo" href="/attachmentstoragesettings" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-epufQc hKPPiy"><div class="sc-jokKPH jtaKKl"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-default" data-component-name="icons/ChevronRightIcon/ChevronRightIcon" class="sc-iUlCMS kEEIsB"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-boLXHU jshptd"><span class="sc-bcyEQV hrIrOF"><span data-text="AttachmentStorageSettings" class="sc-eStdmu liVEkC">AttachmentStorageSettings</span></span></div></li></a><div style="display:none;height:0px;overflow:hidden" class="sc-hgJgCR dlNiXx"></div></div><div data-component-name="Menu/MenuItem" class="sc-gwVKcS fGSWQx menu-item-type-group" role="listitem"><a class="sc-iJONRL iBHKJo" href="/settings" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-epufQc hKPPiy"><div class="sc-jokKPH jtaKKl"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-default" data-component-name="icons/ChevronRightIcon/ChevronRightIcon" class="sc-iUlCMS kEEIsB"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-boLXHU jshptd"><span class="sc-bcyEQV hrIrOF"><span data-text="Settings" classLine truncated
|
||||
<div id="redoc"><div hidden=""><script>try{var m=localStorage.getItem("redoc.colorMode");if(m!=="light"&&m!=="dark")m=matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";document.documentElement.classList.add(m)}catch(e){}</script></div><div style="--navbar-height:0px;--navbar-stack-height:0px" class="sc-kIbBWU fFQMWf"><div class="sc-cjUTkN dGsweu menu-content"><div class="sc-jqwVmx jjzLa-d"><div data-testid="search-trigger" class="sc-cToEys dffrbr"><div class="sc-cRcubC ddjiE"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" data-component-name="icons/SearchIcon/SearchIcon" class="sc-cHazmW gTzQi"><path d="M14.5 13.7931L10.724 10.017C11.6313 8.9277 12.0838 7.5305 11.9872 6.11608C11.8907 4.70165 11.2525 3.37891 10.2055 2.423C9.15857 1.4671 7.78336 0.951637 6.36602 0.983845C4.94867 1.01605 3.5983 1.59345 2.59582 2.59593C1.59335 3.5984 1.01595 4.94877 0.983738 6.36612C0.95153 7.78347 1.46699 9.15867 2.4229 10.2057C3.3788 11.2526 4.70155 11.8908 6.11597 11.9873C7.53039 12.0839 8.92759 11.6314 10.0169 10.7241L13.793 14.5001L14.5 13.7931ZM2.00001 6.50012C2.00001 5.6101 2.26393 4.74007 2.7584 4.00005C3.25286 3.26003 3.95567 2.68325 4.77794 2.34266C5.6002 2.00207 6.505 1.91295 7.37792 2.08658C8.25083 2.26022 9.05266 2.6888 9.68199 3.31814C10.3113 3.94747 10.7399 4.7493 10.9135 5.62221C11.0872 6.49513 10.9981 7.39993 10.6575 8.22219C10.3169 9.04446 9.7401 9.74726 9.00008 10.2417C8.26006 10.7362 7.39003 11.0001 6.50001 11.0001C5.30694 10.9988 4.16312 10.5243 3.31949 9.68064C2.47587 8.83701 2.00133 7.69319 2.00001 6.50012Z"></path></svg><span>Loading...</span></div></div></div><div class="sc-dNLPWG dtcefb"><ul data-component-name="Menu/Menu" class="sc-kBPbfe ctPApS"><div data-component-name="Menu/MenuItem" class="sc-gwVKcS fGSWQx menu-item-type-default" role="listitem"><a class="sc-iJONRL iBHKJo" href="/" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="true" class="sc-epufQc fYmDZR"><div class="sc-boLXHU jshptd"><span class="sc-bcyEQV hrIrOF"><span data-text="WeKan REST API" class="sc-eStdmu iyAVQU">WeKan REST API</span></span></div></li></a></div><div data-component-name="Menu/MenuItem" class="sc-gwVKcS fGSWQx menu-item-type-default" role="listitem"><a class="sc-iJONRL iBHKJo" href="/section/production-security-concerns" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-epufQc itBMtf"><div class="sc-boLXHU jshptd"><span class="sc-bcyEQV hrIrOF"><span data-text="Production Security Concerns" class="sc-eStdmu liVEkC">Production Security Concerns</span></span></div></li></a></div><div data-component-name="Menu/MenuItem" class="sc-gwVKcS fGSWQx menu-item-type-group" role="listitem"><a class="sc-iJONRL iBHKJo" href="/login" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-epufQc hKPPiy"><div class="sc-jokKPH jtaKKl"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-default" data-component-name="icons/ChevronRightIcon/ChevronRightIcon" class="sc-iUlCMS kEEIsB"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-boLXHU jshptd"><span class="sc-bcyEQV hrIrOF"><span data-text="Login" class="sc-eStdmu liVEkC">Login</span></span></div></li></a><div style="display:none;height:0px;overflow:hidden" class="sc-hgJgCR dlNiXx"></div></div><div data-component-name="Menu/MenuItem" class="sc-gwVKcS fGSWQx menu-item-type-group" role="listitem"><a class="sc-iJONRL iBHKJo" href="/attachmentstoragesettings" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-epufQc hKPPiy"><div class="sc-jokKPH jtaKKl"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-default" data-component-name="icons/ChevronRightIcon/ChevronRightIcon" class="sc-iUlCMS kEEIsB"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-boLXHU jshptd"><span class="sc-bcyEQV hrIrOF"><span data-text="AttachmentStorageSettings" class="sc-eStdmu liVEkC">AttachmentStorageSettings</span></span></div></li></a><div style="display:none;height:0px;overflow:hidden" class="sc-hgJgCR dlNiXx"></div></div><div data-component-name="Menu/MenuItem" class="sc-gwVKcS fGSWQx menu-item-type-group" role="listitem"><a class="sc-iJONRL iBHKJo" href="/settings" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-epufQc hKPPiy"><div class="sc-jokKPH jtaKKl"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-default" data-component-name="icons/ChevronRightIcon/ChevronRightIcon" class="sc-iUlCMS kEEIsB"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-boLXHU jshptd"><span class="sc-bcyEQV hrIrOF"><span data-text="Settings" classLine truncated
|
||||
<script type="module">
|
||||
import { hydrate } from "https://cdn.redocly.com/redoc/v3.0.1/bundles/redoc.standalone.js";
|
||||
|
||||
const __redoc_definition = {"openapi":"3.2.0","info":{"title":"WeKan REST API","version":"v13.02","description":"The REST API allows you to control and extend WeKan with ease.\n\nIf you are an end-user and not a dev or a tester, [create an issue](https://github.com/wekan/wekan/issues/new) to request new APIs.\n\n> All API calls in the documentation are made using `curl`. However, you are free to use Java / Python / PHP / Golang / Ruby / Swift / Objective-C / Rust / Scala / C# or any other programming languages.\n\n# Production Security Concerns\nWhen calling a production WeKan server, ensure it is running via HTTPS and has a valid SSL Certificate. The login method requires you to post your username and password in plaintext, which is why we highly suggest only calling the REST login api over HTTPS. Also, few things to note:\n\n* Only call via HTTPS\n* Implement a timed authorization token expiration strategy\n* Ensure the calling user only has permissions for what they are calling and no more\n"},"paths":{"/users/login":{"post":{"operationId":"login","summary":"Login with REST API","tags":["Login"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"description":"Your username\n","type":"string"},"password":{"description":"Your password\n","type":"string","format":"password"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"description":"Your username\n","type":"string"},"password":{"description":"Your password\n","type":"string","format":"password"}}}}},"description":"Login credentials","required":true},"responses":{"200":{"description":"Successful authentication","content":{"*/*":{"schema":{"type":"object","required":["id","token","tokenExpires"],"properties":{"id":{"type":"string","description":"User ID"},"token":{"type":"string","description":"Authentication token\n"},"tokenExpires":{"type":"string","format":"date-time","description":"Token expiration date\n"}}}}}},"400":{"description":"Error in authentication\n","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"reason":{"type":"string"}}}}}},"default":{"description":"Error in authentication\n"}}}},"/users/register":{"post":{"operationId":"register","summary":"Register with REST API","description":"Notes:\n - You will need to provide the token for any of the authenticated methods.\n","tags":["Login"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"username":{"description":"Your username\n","type":"string"},"password":{"description":"Your password\n","type":"string","format":"password"},"email":{"description":"Your email\n","type":"string"}},"required":["username","password","email"]}}},"required":true},"responses":{"200":{"description":"Successful registration","content":{"*/*":{"schema":{"items":{"properties":{"id":{"type":"string"},"token":{"type":"string"},"tokenExpires":{"type":"string"}}}}}}},"400":{"description":"Error in registration\n","content":{"*/*":{"schema":{"items":{"properties":{"error":{"type":"number"},"reason":{"type":"string"}}}}}}},"default":{"description":"Error in registration\n"}}}},"/api/admin/attachment-settings":{"get":{"operationId":"get_attachment_settings","summary":"Get the attachment storage / upload-block settings (GlobalAdmin)","description":"Only the global admin can call this. Returns the Admin Panel >\n Attachments settings document, including `limitSettings.attachmentsUploadBlocked`\n and `limitSettings.avatarsUploadBlocked` plus the size limits. Cloud-storage\n secret keys (S3 secretAccessKey, Azure accountKey/connectionString, GCS\n credentials) are masked and never returned; a boolean `\u003cfield>Set` marker\n shows whether a value exists.\n","tags":["AttachmentStorageSettings","Settings"],"security":[{"UserSecurity":[]}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"Object"}}}}}},"put":{"operationId":"update_attachment_settings","summary":"Update the attachment storage / upload-block settings (GlobalAdmin)","description":"Only the global admin can call this. The request body is a\n partial settings object (for example\n `{\"limitSettings\": {\"avatarsUploadBlocked\": true}}`). It is applied through\n the same update path as the `updateAttachmentStorageSettings` Meteor method,\n so validation and `$set` semantics are identical: cloud-storage secrets left\n blank are preserved. The masked, updated settings document is returned.\n","tags":["AttachmentStorageSettings","Settings"],"security":[{"UserSecurity":[]}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"Object"}}}}}}},"/api/admin/domains":{"get":{"operationId":"get_admin_domains","summary":"List email domains with their user counts (GlobalAdmin)","description":"Only the global admin can call this. CountsLine truncated
|
||||
const __redoc_definition = {"openapi":"3.2.0","info":{"title":"WeKan REST API","version":"v13.04","description":"The REST API allows you to control and extend WeKan with ease.\n\nIf you are an end-user and not a dev or a tester, [create an issue](https://github.com/wekan/wekan/issues/new) to request new APIs.\n\n> All API calls in the documentation are made using `curl`. However, you are free to use Java / Python / PHP / Golang / Ruby / Swift / Objective-C / Rust / Scala / C# or any other programming languages.\n\n# Production Security Concerns\nWhen calling a production WeKan server, ensure it is running via HTTPS and has a valid SSL Certificate. The login method requires you to post your username and password in plaintext, which is why we highly suggest only calling the REST login api over HTTPS. Also, few things to note:\n\n* Only call via HTTPS\n* Implement a timed authorization token expiration strategy\n* Ensure the calling user only has permissions for what they are calling and no more\n"},"paths":{"/users/login":{"post":{"operationId":"login","summary":"Login with REST API","tags":["Login"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"description":"Your username\n","type":"string"},"password":{"description":"Your password\n","type":"string","format":"password"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"description":"Your username\n","type":"string"},"password":{"description":"Your password\n","type":"string","format":"password"}}}}},"description":"Login credentials","required":true},"responses":{"200":{"description":"Successful authentication","content":{"*/*":{"schema":{"type":"object","required":["id","token","tokenExpires"],"properties":{"id":{"type":"string","description":"User ID"},"token":{"type":"string","description":"Authentication token\n"},"tokenExpires":{"type":"string","format":"date-time","description":"Token expiration date\n"}}}}}},"400":{"description":"Error in authentication\n","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"type":"string"},"reason":{"type":"string"}}}}}},"default":{"description":"Error in authentication\n"}}}},"/users/register":{"post":{"operationId":"register","summary":"Register with REST API","description":"Notes:\n - You will need to provide the token for any of the authenticated methods.\n","tags":["Login"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"username":{"description":"Your username\n","type":"string"},"password":{"description":"Your password\n","type":"string","format":"password"},"email":{"description":"Your email\n","type":"string"}},"required":["username","password","email"]}}},"required":true},"responses":{"200":{"description":"Successful registration","content":{"*/*":{"schema":{"items":{"properties":{"id":{"type":"string"},"token":{"type":"string"},"tokenExpires":{"type":"string"}}}}}}},"400":{"description":"Error in registration\n","content":{"*/*":{"schema":{"items":{"properties":{"error":{"type":"number"},"reason":{"type":"string"}}}}}}},"default":{"description":"Error in registration\n"}}}},"/api/admin/attachment-settings":{"get":{"operationId":"get_attachment_settings","summary":"Get the attachment storage / upload-block settings (GlobalAdmin)","description":"Only the global admin can call this. Returns the Admin Panel >\n Attachments settings document, including `limitSettings.attachmentsUploadBlocked`\n and `limitSettings.avatarsUploadBlocked` plus the size limits. Cloud-storage\n secret keys (S3 secretAccessKey, Azure accountKey/connectionString, GCS\n credentials) are masked and never returned; a boolean `\u003cfield>Set` marker\n shows whether a value exists.\n","tags":["AttachmentStorageSettings","Settings"],"security":[{"UserSecurity":[]}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"Object"}}}}}},"put":{"operationId":"update_attachment_settings","summary":"Update the attachment storage / upload-block settings (GlobalAdmin)","description":"Only the global admin can call this. The request body is a\n partial settings object (for example\n `{\"limitSettings\": {\"avatarsUploadBlocked\": true}}`). It is applied through\n the same update path as the `updateAttachmentStorageSettings` Meteor method,\n so validation and `$set` semantics are identical: cloud-storage secrets left\n blank are preserved. The masked, updated settings document is returned.\n","tags":["AttachmentStorageSettings","Settings"],"security":[{"UserSecurity":[]}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"Object"}}}}}}},"/api/admin/domains":{"get":{"operationId":"get_admin_domains","summary":"List email domains with their user counts (GlobalAdmin)","description":"Only the global admin can call this. CountsLine truncated
|
||||
const __redoc_options = {"skipBundle":true,"disableTelemetry":false};
|
||||
|
||||
hydrate(__redoc_definition, __redoc_options, document.getElementById('redoc'));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
swagger: '2.0'
|
||||
info:
|
||||
title: WeKan REST API
|
||||
version: v13.02
|
||||
version: v13.04
|
||||
description: |
|
||||
The REST API allows you to control and extend WeKan with ease.
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ fi
|
||||
# have no Android prebuild, were never compiled, and WeKan did not start. It
|
||||
# is idempotent, so a bundle already prepared is left as it is.
|
||||
"$node" "$root/releases/prepare-bundle-npm.mjs" "$root/bundle"
|
||||
(cd "$server" && npm install)
|
||||
(cd "$server" && bash "$root/releases/npm-retry.sh" npm install)
|
||||
# accounts-password requires both at startup with no fallback. Load them here
|
||||
# with Android's Node.js, so a missing addon stops the build with its name -
|
||||
# check-addon-arch below passes Linux prebuilds, which Android does not load.
|
||||
@@ -86,7 +86,7 @@ for (const name of ["argon2", "bcrypt"]) {
|
||||
catch (error) { console.error(`::error::${name} has no Android addon: ${error.message.split("\n")[0]}`); process.exit(1); }
|
||||
}')
|
||||
# sharp has no Android prebuilt: built from source against Termux's libvips.
|
||||
if ! (cd "$appmods/sharp" && npm install --no-save --omit=dev node-addon-api node-gyp && "$node" install/build.js); then
|
||||
if ! (cd "$appmods/sharp" && bash "$root/releases/npm-retry.sh" npm install --no-save --omit=dev node-addon-api node-gyp && "$node" install/build.js); then
|
||||
echo "::warning::sharp could not be built against Termux's libvips here; it runs as WebAssembly (@img/sharp-wasm32)."
|
||||
fi
|
||||
"$node" "$root/releases/prune-build-only-modules.mjs" "$root/bundle"
|
||||
|
||||
@@ -67,7 +67,9 @@ echo "==> [2/5] meteor build (Sandstorm profile)"
|
||||
rm -rf .meteor-spk/bundle
|
||||
mkdir -p .meteor-spk
|
||||
"$METEOR" build --directory .meteor-spk
|
||||
(cd .meteor-spk/bundle/programs/server && "$METEOR" npm install)
|
||||
# Through npm-retry.sh, as every other bundle's install: v13.03's .spk died
|
||||
# here on a 504 from github.com for meteor/node-source-map-support's tarball.
|
||||
(cd .meteor-spk/bundle/programs/server && bash "$REPO/releases/npm-retry.sh" "$METEOR" npm install)
|
||||
|
||||
echo "==> [3/5] trim the bundle to a linux/x64 sockjs grain"
|
||||
# A grain is linux/x64, always, and talks DDP over sockjs (sandstorm-pkgdef.capnp
|
||||
|
||||
@@ -1,29 +1,64 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Recover stale .deb URLs in Snapcraft's managed base or build instance."""
|
||||
"""Recover stale APT state in Snapcraft's managed base or build instance.
|
||||
|
||||
Two failures are recoverable, and nothing else is:
|
||||
- a .deb that 404s because the instance's package indexes are stale;
|
||||
- "Failed to refresh package list: failed to run apt update" while installing
|
||||
build-packages, which is the Ubuntu archive being briefly unreachable or
|
||||
mid-sync (v13.02: every amd64 snap failed within eight minutes while the
|
||||
arm64 ones, served by ports.ubuntu.com, built). That one is retried with a
|
||||
backoff until apt-get update succeeds in the same instance, so the Snapcraft
|
||||
retry only runs once the archive answers again.
|
||||
"""
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
APT_UPDATE_FAILED = 'Failed to refresh package list: failed to run apt update'
|
||||
# Waits before each further apt-get update attempt for an archive outage.
|
||||
UPDATE_BACKOFF = (30, 60, 120, 240)
|
||||
APT_DIAGNOSTIC = re.compile(r'(?:^|\s)(?:E:|W:|Err:)|Hash Sum mismatch|Failed to fetch|Could not resolve|'
|
||||
r'Temporary failure|Connection failed|Unable to connect')
|
||||
|
||||
|
||||
def apt_diagnostics(text, limit=20):
|
||||
"""The apt error lines from a Snapcraft log, so the job says WHY apt failed."""
|
||||
text = text.replace('\\n', '\n')
|
||||
lines = [line.strip() for line in text.splitlines() if APT_DIAGNOSTIC.search(line)]
|
||||
return list(dict.fromkeys(lines))[-limit:]
|
||||
|
||||
|
||||
def project_instance(text):
|
||||
# craft-providers logs each LXC command with shlex.join. Build and stage
|
||||
# packages are handled in the project instance, after base provisioning
|
||||
# finishes. Never fall back to the base here: changing it cannot repair its clone.
|
||||
if 'Failed to run snapcraft in instance' not in text:
|
||||
raise ValueError('Package failure is not from a failed managed Snapcraft build')
|
||||
instances = set(re.findall(
|
||||
r'lxc --project snapcraft exec local:(snapcraft-[a-zA-Z0-9-]+) ', text))
|
||||
if len(instances) != 1:
|
||||
raise ValueError('Cannot identify one failed Snapcraft build instance in the log')
|
||||
return instances.pop()
|
||||
|
||||
|
||||
def is_update_failure(text):
|
||||
return APT_UPDATE_FAILED in text.replace('\\n', '\n')
|
||||
|
||||
|
||||
def failed_instance(text):
|
||||
text = text.replace('\\n', '\n')
|
||||
if is_update_failure(text):
|
||||
return project_instance(text)
|
||||
if not re.search(
|
||||
r'Failed to fetch[^\n]*\.deb[^\n]*(?:\n[^\n]*)?404', text):
|
||||
raise ValueError('Not a managed APT package 404; refusing to retry this build failure')
|
||||
raise ValueError('Not a managed APT package 404 or apt update failure; '
|
||||
'refusing to retry this build failure')
|
||||
if 'Failed to fetch package:' in text:
|
||||
if 'Failed to run snapcraft in instance' not in text:
|
||||
raise ValueError('Stage-package 404 is not from a failed managed Snapcraft build')
|
||||
# craft-providers logs each LXC command with shlex.join. Stage packages
|
||||
# are fetched in the project instance, after base provisioning finishes.
|
||||
# Never fall back to the base here: changing it cannot repair its clone.
|
||||
instances = set(re.findall(
|
||||
r'lxc --project snapcraft exec local:(snapcraft-[a-zA-Z0-9-]+) ', text))
|
||||
if len(instances) != 1:
|
||||
raise ValueError('Cannot identify one failed Snapcraft build instance in the log')
|
||||
return instances.pop()
|
||||
return project_instance(text)
|
||||
instances = re.findall(
|
||||
r'lxc --project snapcraft exec local:(base-instance-snapcraft-[a-zA-Z0-9-]+) '
|
||||
r'[^\n]*apt-get install', text) if 'Failed to install packages' in text else []
|
||||
@@ -32,8 +67,9 @@ def failed_instance(text):
|
||||
return instances[-1]
|
||||
|
||||
|
||||
def refresh(text):
|
||||
def refresh(text, sleep=time.sleep):
|
||||
name = failed_instance(text)
|
||||
waits = UPDATE_BACKOFF if is_update_failure(text) else ()
|
||||
prefix = ['lxc', '--project', 'snapcraft']
|
||||
def run(args):
|
||||
return subprocess.run(prefix + args, check=True, text=True,
|
||||
@@ -50,11 +86,24 @@ def refresh(text):
|
||||
try:
|
||||
# craft-parts uses /var/lib/apt for stage-package indexes as well.
|
||||
# Refresh them in the guest; downloaded packages and part state stay intact.
|
||||
print('Refreshing APT indexes in failed Snapcraft instance ' + name, flush=True)
|
||||
result = run(['exec', 'local:' + name, '--', 'env', 'DEBIAN_FRONTEND=noninteractive',
|
||||
'apt-get', '-o', 'Acquire::Retries=3',
|
||||
'-o', 'APT::Update::Error-Mode=any', 'update'])
|
||||
print(result.stdout, end='')
|
||||
update = ['exec', 'local:' + name, '--', 'env', 'DEBIAN_FRONTEND=noninteractive',
|
||||
'apt-get', '-o', 'Acquire::Retries=3',
|
||||
'-o', 'APT::Update::Error-Mode=any', 'update']
|
||||
for attempt, wait in enumerate((0,) + tuple(waits), 1):
|
||||
if wait:
|
||||
print(f'apt-get update still failing; waiting {wait}s for the archive '
|
||||
f'(attempt {attempt}/{len(waits) + 1}) ...', flush=True)
|
||||
sleep(wait)
|
||||
print('Refreshing APT indexes in failed Snapcraft instance ' + name, flush=True)
|
||||
try:
|
||||
result = run(update)
|
||||
except subprocess.CalledProcessError as error:
|
||||
if attempt > len(waits):
|
||||
raise
|
||||
print((error.stdout or '').rstrip(), flush=True)
|
||||
continue
|
||||
print(result.stdout, end='')
|
||||
break
|
||||
finally:
|
||||
if stopped:
|
||||
run(['stop', 'local:' + name, '--timeout', '30'])
|
||||
@@ -73,6 +122,10 @@ if __name__ == '__main__':
|
||||
raise ValueError('No Snapcraft execution log found; original failure remains fatal')
|
||||
log = max(logs, key=lambda item: item.stat().st_mtime_ns)
|
||||
print('Inspecting ' + str(log), flush=True)
|
||||
refresh(log.read_text(encoding='utf-8', errors='replace'))
|
||||
text = log.read_text(encoding='utf-8', errors='replace')
|
||||
diagnostics = apt_diagnostics(text)
|
||||
if diagnostics:
|
||||
print('APT reported:\n ' + '\n '.join(diagnostics), flush=True)
|
||||
refresh(text)
|
||||
except (ValueError, OSError, subprocess.SubprocessError) as error:
|
||||
parser.exit(1, str(error) + '\n')
|
||||
@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
|
||||
appTitle = (defaultText = "Wekan"),
|
||||
# The name of the app as it is displayed to the user.
|
||||
|
||||
appVersion = 1302,
|
||||
appVersion = 1304,
|
||||
# Increment this for every release.
|
||||
|
||||
appMarketingVersion = (defaultText = "13.02~2026-11-09"),
|
||||
appMarketingVersion = (defaultText = "13.04~2026-11-09"),
|
||||
# Human-readable presentation of the app version.
|
||||
|
||||
minUpgradableAppVersion = 0,
|
||||
|
||||
@@ -33,9 +33,19 @@ export async function canCommentInList(userId, board, listId) {
|
||||
* The REST API's half: a list that refuses this user's role refuses the API
|
||||
* too (403), so a restriction cannot be stepped round with a token. A list's
|
||||
* GRANT does not open the API to a role the board does not let write.
|
||||
*
|
||||
* ListLockBleed (GHSA-4734-8vrg-8j3w): the checklist and checklist-item routes
|
||||
* did not ask, so a member a list refused still wrote its cards' checklists
|
||||
* over REST. Every REST write that names a card asks now
|
||||
* (tests/listPermissions.test.cjs), and the refusal is recorded in Admin
|
||||
* Panel -> Problems: no screen offers such a write, so it is an attempt.
|
||||
*/
|
||||
export async function assertListNotRefused(userId, board, listId, capability = 'write') {
|
||||
export async function assertListNotRefused(userId, board, listId, capability = 'write', source = 'rest:list-locked') {
|
||||
if ((await listException(userId, board, listId, capability)) !== false) return;
|
||||
try {
|
||||
require('/server/lib/securityLog').record({ key: 'authz.list-locked', action: 'blocked', source, userId,
|
||||
detail: `A REST ${capability} in a list whose exception refuses the caller's role.` });
|
||||
} catch (e) { /* logging must never break the guard */ }
|
||||
const { Meteor } = require('meteor/meteor');
|
||||
const error = new Meteor.Error('Forbidden', 'Forbidden');
|
||||
error.statusCode = 403;
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Meteor } from 'meteor/meteor';
|
||||
import { WebApp } from 'meteor/webapp';
|
||||
import { Authentication } from '/server/authentication';
|
||||
import { sendJsonResult } from '/server/apiMiddleware';
|
||||
import { assertListNotRefused } from '/server/lib/listPermissionGate';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import ChecklistItems, {
|
||||
itemCreation,
|
||||
@@ -145,6 +146,8 @@ WebApp.handlers.post(
|
||||
if (checklist) {
|
||||
const card = await ReactiveCache.getCard(paramCardId);
|
||||
if (card && card.boardId === paramBoardId) {
|
||||
// ListLockBleed (GHSA-4734-8vrg-8j3w): the list's refusal holds over REST too (#4527).
|
||||
await assertListNotRefused(req.userId, await ReactiveCache.getBoard(paramBoardId), card.listId, 'write', 'rest:checklist-item');
|
||||
// Append, like the UI does. Every item created over REST used to be given
|
||||
// `sort: 0`, so a checklist filled through the API came out in an order
|
||||
// nobody chose - and every item after the first shared the first one's
|
||||
@@ -214,6 +217,8 @@ WebApp.handlers.put(
|
||||
});
|
||||
return;
|
||||
}
|
||||
// ListLockBleed (GHSA-4734-8vrg-8j3w): the list's refusal holds over REST too (#4527).
|
||||
await assertListNotRefused(req.userId, await ReactiveCache.getBoard(paramBoardId), card.listId, 'write', 'rest:checklist-item');
|
||||
|
||||
const deadline = parseDueAt(req.body);
|
||||
if (deadline.error) {
|
||||
@@ -277,6 +282,8 @@ WebApp.handlers.delete(
|
||||
});
|
||||
return;
|
||||
}
|
||||
// ListLockBleed (GHSA-4734-8vrg-8j3w): the list's refusal holds over REST too (#4527).
|
||||
await assertListNotRefused(req.userId, await ReactiveCache.getBoard(paramBoardId), card.listId, 'write', 'rest:checklist-item');
|
||||
|
||||
await ChecklistItems.direct.removeAsync({ _id: paramItemId });
|
||||
sendJsonResult(res, {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { parseDueAt, checklistWithItems } from '/server/lib/checklistDeadlines';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { WebApp } from 'meteor/webapp';
|
||||
import { assertListNotRefused } from '/server/lib/listPermissionGate';
|
||||
import { Authentication } from '/server/authentication';
|
||||
import { sendJsonResult } from '/server/apiMiddleware';
|
||||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
@@ -266,6 +267,8 @@ WebApp.handlers.post(
|
||||
});
|
||||
return;
|
||||
}
|
||||
// ListLockBleed (GHSA-4734-8vrg-8j3w): the list's refusal holds over REST too (#4527).
|
||||
await assertListNotRefused(req.userId, await ReactiveCache.getBoard(paramBoardId), card.listId, 'write', 'rest:checklist');
|
||||
|
||||
const deadline = parseDueAt(req.body);
|
||||
if (deadline.error) {
|
||||
@@ -335,6 +338,8 @@ WebApp.handlers.put(
|
||||
});
|
||||
return;
|
||||
}
|
||||
// ListLockBleed (GHSA-4734-8vrg-8j3w): the list's refusal holds over REST too (#4527).
|
||||
await assertListNotRefused(req.userId, await ReactiveCache.getBoard(paramBoardId), card.listId, 'write', 'rest:checklist');
|
||||
|
||||
const checklist = await ReactiveCache.getChecklist({
|
||||
_id: paramChecklistId,
|
||||
@@ -390,6 +395,8 @@ WebApp.handlers.delete(
|
||||
});
|
||||
return;
|
||||
}
|
||||
// ListLockBleed (GHSA-4734-8vrg-8j3w): the list's refusal holds over REST too (#4527).
|
||||
await assertListNotRefused(req.userId, await ReactiveCache.getBoard(paramBoardId), card.listId, 'write', 'rest:checklist');
|
||||
|
||||
const checklist = await ReactiveCache.getChecklist({
|
||||
_id: paramChecklistId,
|
||||
|
||||
+4
-4
@@ -19,7 +19,7 @@
|
||||
# base: core24 (not core26) · no build-base: devel · grade: stable
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
name: wekan
|
||||
version: '13.02'
|
||||
version: '13.04'
|
||||
base: core24
|
||||
confinement: strict
|
||||
grade: stable
|
||||
@@ -703,18 +703,18 @@ parts:
|
||||
armhf) WEKAN_ARCH="armhf" ;;
|
||||
*) echo "Unsupported architecture: ${CRAFT_ARCH_BUILD_FOR}"; exit 1 ;;
|
||||
esac
|
||||
WEKAN_ZIP="wekan-13.02-${WEKAN_ARCH}.zip"
|
||||
WEKAN_ZIP="wekan-13.04-${WEKAN_ARCH}.zip"
|
||||
echo "Cleaning environment first"
|
||||
rm -rf .build
|
||||
mkdir .build
|
||||
cd .build
|
||||
#wget https://github.com/wekan/wekan/releases/download/v13.02/wekan-13.02-amd64.zip
|
||||
#wget https://github.com/wekan/wekan/releases/download/v13.04/wekan-13.04-amd64.zip
|
||||
# Retry: a release asset can 404 for a short while right after it is
|
||||
# uploaded (CDN/propagation lag), and a plain wget treated that as
|
||||
# fatal. --retry-on-http-error covers the 404/5xx window; a genuinely
|
||||
# missing bundle still fails after the tries are spent.
|
||||
wget --tries=20 --waitretry=20 --retry-on-http-error=404,403,500,502,503 \
|
||||
"https://github.com/wekan/wekan/releases/download/v13.02/${WEKAN_ZIP}"
|
||||
"https://github.com/wekan/wekan/releases/download/v13.04/${WEKAN_ZIP}"
|
||||
unzip "${WEKAN_ZIP}"
|
||||
python3 ../releases/check-telemetry.py --bundle bundle
|
||||
rm "${WEKAN_ZIP}"
|
||||
|
||||
@@ -37,7 +37,7 @@ test('the bundle is rebuilt by the Android Node.js itself, checked and started',
|
||||
// happened in programs/server/node_modules, where sharp is not.
|
||||
assert.match(build, /appmods="\$server\/npm\/node_modules"\nrm -rf "\$appmods\/@img\/sharp-linux-"\*/);
|
||||
assert.doesNotMatch(build, /rm -rf "\$server\/node_modules\/@img/, 'not the wrong directory');
|
||||
assert.match(build, /cd "\$appmods\/sharp" && npm install --no-save --omit=dev node-addon-api node-gyp && "\$node" install\/build\.js/);
|
||||
assert.match(build, /cd "\$appmods\/sharp" && bash "\$root\/releases\/npm-retry\.sh" npm install --no-save --omit=dev node-addon-api node-gyp && "\$node" install\/build\.js/);
|
||||
assert.match(build, /::warning::sharp could not be built[^\n]*WebAssembly/);
|
||||
// Termux's user does not own the bind mount: chmod only what is not
|
||||
// already executable (v12.43-v12.44 stopped at "Operation not permitted").
|
||||
@@ -57,7 +57,9 @@ test('argon2 and bcrypt are compiled for Android and must load before the bundle
|
||||
// was found for platform=android" until the 240 s smoke test gave up.
|
||||
const build = read('releases/android/build-bundle.sh');
|
||||
const prepare = build.indexOf('"$node" "$root/releases/prepare-bundle-npm.mjs" "$root/bundle"');
|
||||
const install = build.indexOf('(cd "$server" && npm install)');
|
||||
// Through npm-retry.sh since v13.03's Sandstorm .spk was lost to a 504 from
|
||||
// github.com (tests/npmRetry.test.cjs): the same install, retried on outage.
|
||||
const install = build.indexOf('(cd "$server" && bash "$root/releases/npm-retry.sh" npm install)');
|
||||
const loads = build.indexOf('for (const name of ["argon2", "bcrypt"])');
|
||||
assert.ok(prepare > 0 && prepare < install, 'the bundle declares its installers before npm installs');
|
||||
assert.ok(loads > install && loads < build.indexOf('check-addon-arch.mjs'), 'loaded with Android Node.js right after the install');
|
||||
@@ -103,7 +105,7 @@ test('termux-exec is preloaded before npm, so #!/usr/bin/env scripts run', () =>
|
||||
assert(preload > 0, 'LD_PRELOAD is exported');
|
||||
assert.match(build, /"\$PREFIX\/lib\/libtermux-exec-ld-preload\.so" "\$PREFIX\/lib\/libtermux-exec\.so"/, 'both termux-exec generations, newest first, as login does');
|
||||
assert.match(build, /LD_PRELOAD="\$lib" sh -c true/, 'kept only if a program still starts with it');
|
||||
assert(preload < build.indexOf('(cd "$server" && npm install)'), 'before npm runs any install script');
|
||||
assert(preload < build.indexOf('(cd "$server" && bash "$root/releases/npm-retry.sh" npm install)'), 'before npm runs any install script');
|
||||
});
|
||||
|
||||
test('negative: an LD_PRELOAD already set is not replaced', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
// Guard: GHSA-6xqf-jh8x-4wxc (2026-11-08). The DDP methods archiveSelectedCards
|
||||
// Guard: UnassignedArchiveBleed, GHSA-6xqf-jh8x-4wxc (2026-11-08). The DDP methods archiveSelectedCards
|
||||
// and createBoardFromCard asked only for the board's `write` capability. The
|
||||
// normal-assigned-only role has write: true but sees only its own cards, so a
|
||||
// member with that role archived - and hid - cards not assigned to them, and
|
||||
|
||||
@@ -30,7 +30,9 @@ assert.equal(parseDueAt({ dueAt: '2026-09-15T14:30:00+02:00' }).dueAt.toISOStrin
|
||||
vm.runInNewContext(src.slice(start, end), {
|
||||
WebApp: { handlers: { put: (route, fn) => { handler = fn; } } }, parseDueAt,
|
||||
Authentication: { checkBoardWriteAccess: async () => { if (denied) throw Error('denied'); } },
|
||||
ReactiveCache: { getCard: async () => wrongCard ? null : card, getChecklist: async () => ({ _id: 'check' }) },
|
||||
ReactiveCache: { getCard: async () => wrongCard ? null : card, getChecklist: async () => ({ _id: 'check' }), getBoard: async () => ({ _id: 'board' }) },
|
||||
// ListLockBleed's list check: tests/listPermissions.test.cjs pins it; here the list allows.
|
||||
assertListNotRefused: async () => {},
|
||||
Checklists: { direct: { updateAsync: async (...args) => updates.push(args) } },
|
||||
sendJsonResult: (res, data) => { response = data; },
|
||||
});
|
||||
@@ -51,7 +53,8 @@ assert.equal(parseDueAt({ dueAt: '2026-09-15T14:30:00+02:00' }).dueAt.toISOStrin
|
||||
vm.runInNewContext(itemSource.slice(itemStart, itemEnd), {
|
||||
WebApp: { handlers: { put: (route, fn) => { itemHandler = fn; } } }, parseDueAt,
|
||||
Authentication: { checkBoardWriteAccess: async () => {} },
|
||||
ReactiveCache: { getChecklistItem: async () => ({ _id: 'item', cardId: 'card', checklistId: 'check' }), getCard: async () => ({ _id: 'card', boardId: 'board' }) },
|
||||
ReactiveCache: { getChecklistItem: async () => ({ _id: 'item', cardId: 'card', checklistId: 'check' }), getCard: async () => ({ _id: 'card', boardId: 'board' }), getBoard: async () => ({ _id: 'board' }) },
|
||||
assertListNotRefused: async () => {},
|
||||
ChecklistItems: { direct: { updateAsync: async (...args) => itemUpdates.push(args) } },
|
||||
sendJsonResult: (res, data) => { itemResponse = data; },
|
||||
});
|
||||
|
||||
@@ -57,7 +57,11 @@ function fixture() {
|
||||
getChecklistItems: async () => [],
|
||||
getCard: async id => cards[id] || null,
|
||||
getChecklist: async q => (checklists[q._id] && checklists[q._id].cardId === q.cardId ? checklists[q._id] : null),
|
||||
getBoard: async id => ({ _id: id }),
|
||||
},
|
||||
// ListLockBleed's list check (tests/listPermissions.test.cjs pins it); the
|
||||
// lists of this fixture refuse nobody.
|
||||
assertListNotRefused: async () => {},
|
||||
ChecklistItems: {
|
||||
insertAsync: async doc => { inserted.push(doc); return 'new'; },
|
||||
direct: {
|
||||
|
||||
@@ -130,6 +130,73 @@ test('the REST API honours a list\'s refusal on every per-list card route', () =
|
||||
assert.match(read('server/models/cardComments.js'), /canCommentInList\(req\.userId, board, card\.listId\)/, 'comments too');
|
||||
});
|
||||
|
||||
// ListLockBleed (GHSA-4734-8vrg-8j3w): the checklist and checklist-item REST
|
||||
// routes asked only the board, so a member a list refused still wrote its
|
||||
// cards' checklists with a token. Not one route at a time: EVERY REST write in
|
||||
// the tree that names a card must ask the list - or be named here, with why.
|
||||
test('negative: every REST write that names a card asks the list (ListLockBleed)', () => {
|
||||
const unrelated = {
|
||||
// A comment's edit and deletion follow the comment's own rule (its author,
|
||||
// or a board admin: assertCanMutateComment), on DDP as over REST; a list's
|
||||
// comment refusal stops NEW comments, which the POST route asks.
|
||||
'PUT /api/boards/:boardId/cards/:cardId/comments/:commentId': 'comment rule',
|
||||
'DELETE /api/boards/:boardId/cards/:cardId/comments/:commentId': 'comment rule',
|
||||
// Dependency lines have their own board-wide rule (canEditBoardDependencies),
|
||||
// the same on DDP (setBoardDependency) as over REST.
|
||||
'POST /api/boards/:boardId/cards/:cardId/dependencies': 'dependency rule',
|
||||
'PUT /api/boards/:boardId/cards/:cardId/dependencies/:targetId': 'dependency rule',
|
||||
'DELETE /api/boards/:boardId/cards/:cardId/dependencies/:targetId': 'dependency rule',
|
||||
// A bot runner's report of its own run, written to BotRuns, not the card.
|
||||
'POST /api/boards/:boardId/cards/:cardId/bot-runs/:runId': 'bot run report',
|
||||
};
|
||||
const found = [], missing = [];
|
||||
const walk = dir => {
|
||||
for (const entry of fs.readdirSync(path.join(ROOT, dir), { withFileTypes: true })) {
|
||||
const rel = path.join(dir, entry.name);
|
||||
if (entry.isDirectory()) { if (!['tests', 'node_modules'].includes(entry.name)) walk(rel); continue; }
|
||||
if (!/\.js$/.test(entry.name)) continue;
|
||||
const src = read(rel);
|
||||
for (const m of src.matchAll(/WebApp\.handlers\.(post|put|delete|patch)\(\s*['"`]([^'"`]*:cardId[^'"`]*)['"`]/g)) {
|
||||
const route = `${m[1].toUpperCase()} ${m[2]}`;
|
||||
found.push(route);
|
||||
const next = src.indexOf('WebApp.handlers.', m.index + 1);
|
||||
let body = src.slice(m.index, next < 0 ? undefined : next);
|
||||
const delegate = /await (\w+)\(req, res\b/.exec(body);
|
||||
if (delegate) {
|
||||
const start = src.indexOf(`async function ${delegate[1]}(`);
|
||||
if (start >= 0) body += src.slice(start, src.indexOf('\n}\n', start));
|
||||
}
|
||||
if (!/assertListNotRefused\(|canWriteInList\(|canCommentInList\(/.test(body) && !unrelated[route]) missing.push(`${route} (${rel})`);
|
||||
}
|
||||
}
|
||||
};
|
||||
walk('server');
|
||||
walk('models');
|
||||
assert.ok(found.length >= 20, `the REST card write routes are found (${found.length})`);
|
||||
for (const route of ['POST /api/boards/:boardId/cards/:cardId/checklists', 'PUT /api/boards/:boardId/cards/:cardId/checklists/:checklistId',
|
||||
'DELETE /api/boards/:boardId/cards/:cardId/checklists/:checklistId', 'POST /api/boards/:boardId/cards/:cardId/checklists/:checklistId/items',
|
||||
'PUT /api/boards/:boardId/cards/:cardId/checklists/:checklistId/items/:itemId',
|
||||
'DELETE /api/boards/:boardId/cards/:cardId/checklists/:checklistId/items/:itemId']) {
|
||||
assert.ok(found.includes(route), `${route} is scanned`);
|
||||
}
|
||||
assert.deepEqual(missing, []);
|
||||
// The exceptions are real routes: a renamed one must be looked at again.
|
||||
for (const route of Object.keys(unrelated)) assert.ok(found.includes(route), `${route} still exists`);
|
||||
});
|
||||
|
||||
test('the refusal is recorded in Admin Panel -> Problems, and never breaks the guard (ListLockBleed)', () => {
|
||||
const gate = read('server/lib/listPermissionGate.js');
|
||||
const fn = gate.slice(gate.indexOf('export async function assertListNotRefused('));
|
||||
assert.match(fn, /record\(\{ key: 'authz\.list-locked', action: 'blocked'/);
|
||||
assert.match(fn, /catch \(e\) \{ \/\* logging must never break the guard \*\/ \}/);
|
||||
// Recorded only on the refusal: after the early return of an allowed write.
|
||||
assert.ok(fn.indexOf("!== false) return;") < fn.indexOf('record('), 'an allowed write records nothing');
|
||||
const { categoryFor } = require('../models/lib/securityCategories');
|
||||
const cat = categoryFor('authz.list-locked');
|
||||
assert.equal(cat.bleed, 'ListLockBleed');
|
||||
assert.equal(cat.severity, 'medium', 'recorded, never disables the account');
|
||||
});
|
||||
|
||||
test('the client offers what the list allows', () => {
|
||||
const utils = read('client/lib/utils.js');
|
||||
assert.match(utils, /canModifyCard\([\s\S]*?return Utils\.currentUserCanInList\('write', card, board\);/);
|
||||
|
||||
@@ -141,6 +141,46 @@ test('every npm install in the release goes through it', () => {
|
||||
'these npm commands can lose a release to a five-minute outage');
|
||||
});
|
||||
|
||||
test('every npm install in a script a workflow runs goes through it too', () => {
|
||||
// The test above read only release-all.yml, so a bare install one level down
|
||||
// passed it: v13.03's Sandstorm .spk died on a 504 from github.com inside
|
||||
// releases/sandstorm-slim-spk.sh, and the Android bundle had the same line.
|
||||
// So read every releases/ script any workflow names, and the scripts those
|
||||
// name in turn.
|
||||
const wfDir = path.join(repoRoot, '.github/workflows');
|
||||
const seen = new Set();
|
||||
const queue = [];
|
||||
// Only command lines name a script that runs: a commented-out `scp` of one
|
||||
// does not run it.
|
||||
const scan = text => {
|
||||
const code = text.split('\n').filter(l => !/^\s*#/.test(l)).join('\n');
|
||||
for (const m of code.matchAll(/releases\/[\w./-]+\.sh\b/g)) {
|
||||
const rel = m[0];
|
||||
if (!seen.has(rel) && fs.existsSync(path.join(repoRoot, rel))) { seen.add(rel); queue.push(rel); }
|
||||
}
|
||||
};
|
||||
fs.readdirSync(wfDir).filter(f => /\.ya?ml$/.test(f))
|
||||
.forEach(f => scan(fs.readFileSync(path.join(wfDir, f), 'utf8')));
|
||||
const bare = [];
|
||||
while (queue.length) {
|
||||
const rel = queue.shift();
|
||||
const text = fs.readFileSync(path.join(repoRoot, rel), 'utf8');
|
||||
scan(text);
|
||||
text.split('\n').forEach((line, i) => {
|
||||
if (/^\s*#/.test(line)) return;
|
||||
if (!/\bnpm (install|ci)\b/.test(line)) return;
|
||||
if (line.includes('npm-retry.sh')) return;
|
||||
if (line.includes('|| true')) return; // best-effort, as above
|
||||
if (/\bgrep\b/.test(line)) return; // looking for the line, not running it
|
||||
if (/^\s*(echo|printf)\b|"[^"]*\bnpm (install|ci)\b[^"]*"\s*(>&2|;|\)|$)/.test(line) && !/\(cd /.test(line)) return; // a message, not a command
|
||||
bare.push(`${rel}:${i + 1}: ${line.trim()}`);
|
||||
});
|
||||
}
|
||||
assert.ok(seen.has('releases/sandstorm-slim-spk.sh'), 'the Sandstorm pack script is among the scripts read');
|
||||
assert.deepStrictEqual(bare, [],
|
||||
'these npm commands, run by a workflow, can lose a release to a five-minute outage');
|
||||
});
|
||||
|
||||
test('the containers can reach the script that retries for them', () => {
|
||||
// Two of these installs run inside `docker run`, where the repository is not
|
||||
// present unless it is mounted. A call to /releases/npm-retry.sh in a
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
// GHSA-6xqf-jh8x-4wxc (2026-11-08): an assigned-only member passed the
|
||||
// UnassignedArchiveBleed, GHSA-6xqf-jh8x-4wxc (2026-11-08): an assigned-only member passed the
|
||||
// board-level write check of archiveSelectedCards and createBoardFromCard for
|
||||
// every card on the board, so they archived - and hid - cards not assigned to
|
||||
// them, and turned any card into a linked-board card. Both methods now ask the
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
'use strict';
|
||||
// ListLockBleed (GHSA-4734-8vrg-8j3w): a list whose exception refuses a role
|
||||
// write (#4527) refuses that role's checklist and checklist-item writes over
|
||||
// REST too, and the attempt is in Admin Panel -> Problems. A list without the
|
||||
// refusal still takes the same writes.
|
||||
const { test, expect } = require('../fixtures');
|
||||
const db = require('../helpers/db');
|
||||
|
||||
test('a list refusing a role write refuses its checklist REST writes (ListLockBleed)', async ({ request, board, user, user2 }) => {
|
||||
const original = db.getBoard(board.boardId).members;
|
||||
const [lockedListId, openListId] = board.listIds;
|
||||
const card = id => db.find('cards', { boardId: board.boardId, listId: id })[0];
|
||||
const locked = card(lockedListId), open = card(openListId);
|
||||
const api = (method, url, data) => request[method](url, {
|
||||
headers: { Authorization: `Bearer ${user2.token}`, 'Content-Type': 'application/json' }, ...(data ? { data } : {}) });
|
||||
const recorded = () => db.findOne('eventlog', { bleed: 'ListLockBleed' })?.count || 0;
|
||||
db.updateOne('boards', { _id: board.boardId }, { $set: { members: [...original.filter(m => m.userId !== user2.id),
|
||||
{ userId: user2.id, isActive: true, isAdmin: false }] } });
|
||||
db.updateOne('lists', { _id: lockedListId }, { $set: { roleExceptions: { normal: { write: false } } } });
|
||||
const checklist = { _id: db.uid('locked-checklist'), cardId: locked._id, title: 'Locked', sort: 0 };
|
||||
const item = { _id: db.uid('locked-item'), cardId: locked._id, checklistId: checklist._id, title: 'Locked item', sort: 0, isFinished: false };
|
||||
db.insertOne('checklists', checklist);
|
||||
db.insertOne('checklistItems', item);
|
||||
try {
|
||||
const before = recorded();
|
||||
const base = `/api/boards/${board.boardId}/cards/${locked._id}/checklists`;
|
||||
for (const [method, url, data] of [
|
||||
['post', base, { title: 'x' }],
|
||||
['put', `${base}/${checklist._id}`, { title: 'renamed' }],
|
||||
['post', `${base}/${checklist._id}/items`, { title: 'new item' }],
|
||||
['put', `${base}/${checklist._id}/items/${item._id}`, { isFinished: 'true', title: 'changed' }],
|
||||
['delete', `${base}/${checklist._id}/items/${item._id}`],
|
||||
['delete', `${base}/${checklist._id}`],
|
||||
]) {
|
||||
const res = await api(method, url, data);
|
||||
expect(res.status(), `${method.toUpperCase()} ${url}`).toBe(403);
|
||||
}
|
||||
expect(db.find('checklists', { cardId: locked._id })).toEqual([expect.objectContaining({ _id: checklist._id, title: 'Locked' })]);
|
||||
expect(db.find('checklistItems', { cardId: locked._id })).toEqual([expect.objectContaining({ _id: item._id, title: 'Locked item', isFinished: false })]);
|
||||
expect(recorded()).toBeGreaterThan(before);
|
||||
expect(db.findOne('users', { _id: user2.id }).loginDisabled || false).toBe(false);
|
||||
|
||||
// Negative: the same member writes the checklists of a list without the refusal.
|
||||
const made = await api('post', `/api/boards/${board.boardId}/cards/${open._id}/checklists`, { title: 'Open', items: ['one'] });
|
||||
expect(made.status()).toBe(200);
|
||||
const openId = (await made.json())._id;
|
||||
expect((await api('put', `/api/boards/${board.boardId}/cards/${open._id}/checklists/${openId}`, { title: 'Open renamed' })).status()).toBe(200);
|
||||
expect((await api('delete', `/api/boards/${board.boardId}/cards/${open._id}/checklists/${openId}`)).status()).toBe(200);
|
||||
// And the board admin, whom no list exception binds, writes the locked list's.
|
||||
const admin = await request.post(base, { headers: { Authorization: `Bearer ${user.token}`, 'Content-Type': 'application/json' }, data: { title: 'Admin' } });
|
||||
expect(admin.status()).toBe(200);
|
||||
} finally {
|
||||
db.updateOne('boards', { _id: board.boardId }, { $set: { members: original } });
|
||||
db.updateOne('lists', { _id: lockedListId }, { $unset: { roleExceptions: '' } });
|
||||
db.deleteMany('checklists', { cardId: { $in: [locked._id, open._id] } });
|
||||
db.deleteMany('checklistItems', { cardId: { $in: [locked._id, open._id] } });
|
||||
}
|
||||
});
|
||||
@@ -221,6 +221,8 @@ const GUARDED = {
|
||||
importplacementbleed: ['tests/importPlacementBleed.test.cjs', 'tests/playwright/specs/security-import-placement.e2e.js'],
|
||||
samlsubjectbleed: ['tests/samlIdentityBinding.test.cjs'],
|
||||
stampbleed: ['tests/stampBleed.test.cjs', 'tests/playwright/specs/upload-stamp-bleed.e2e.js'],
|
||||
listlockbleed: ['tests/listPermissions.test.cjs', 'tests/playwright/specs/list-lock-checklists.e2e.js'],
|
||||
unassignedarchivebleed: ['tests/assignedCardMethods.test.cjs', 'tests/playwright/specs/assigned-card-methods.e2e.js'],
|
||||
unassignedattachbleed: ['tests/unassignedAttachBleed.test.cjs', 'tests/playwright/specs/unassigned-attach-bleed.e2e.js'],
|
||||
uploadbleed: ['tests/uploadBleed.test.cjs', 'tests/playwright/specs/upload-stamp-bleed.e2e.js'],
|
||||
};
|
||||
@@ -371,7 +373,9 @@ test('the whole published list is accounted for', () => {
|
||||
// 144 -> 145: CreateBleed (GHSA-qcfm-2g4w-wqcc, 2026-11-07), guarded. It went
|
||||
// unnoticed until the companion checkout moved to .tools/w/wekan.fi and this
|
||||
// file looked there: at the old path the comparison was skipped.
|
||||
assert.strictEqual(total, 145, 'the Hall of Fame and this list disagree on how many there are');
|
||||
// 145 -> 146: UnassignedArchiveBleed (GHSA-6xqf-jh8x-4wxc, 2026-11-08), guarded.
|
||||
// 146 -> 147: ListLockBleed (GHSA-4734-8vrg-8j3w, 2026-11-09), guarded.
|
||||
assert.strictEqual(total, 147, 'the Hall of Fame and this list disagree on how many there are');
|
||||
});
|
||||
|
||||
test('the companion Hall of Fame names match the inventory when available', () => {
|
||||
|
||||
@@ -22,6 +22,16 @@ STAGE_LOG = (LOG.split('* Command standard error')[0]
|
||||
"Failed to fetch package: The item '/root/.cache/snapcraft/download/"
|
||||
"libcurl4t64_8.5.0-2ubuntu10.15_amd64.deb' could not be fetched: "
|
||||
'404 Not Found [IP: 91.189.91.82 80].\nFailed to run snapcraft in instance\n')
|
||||
# v13.02 amd64: build-packages could not run apt update in the project
|
||||
# instance while the amd64 archive was unreachable.
|
||||
UPDATE_LOG = ('Executing in container: /snap/bin/lxc --project snapcraft exec local:' + BUILD
|
||||
+ ' --cwd /root/project --mode non-interactive -- env CRAFT_MANAGED_MODE=1 snapcraft pack\n'
|
||||
':: Installing build-packages\n'
|
||||
':: E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/noble-updates/InRelease '
|
||||
'Could not connect to archive.ubuntu.com:80 (185.125.190.81), connection timed out\n'
|
||||
':: W: Some index files failed to download. They have been ignored, or old ones used instead.\n'
|
||||
'Failed to refresh package list: failed to run apt update.\n'
|
||||
'Failed to run snapcraft in instance\n')
|
||||
|
||||
|
||||
class RecoveryTests(unittest.TestCase):
|
||||
@@ -46,6 +56,72 @@ class RecoveryTests(unittest.TestCase):
|
||||
with self.subTest(text=text), self.assertRaises(ValueError):
|
||||
recovery.failed_instance(text)
|
||||
|
||||
def test_apt_update_failure_selects_project_instance(self):
|
||||
self.assertEqual(recovery.failed_instance(UPDATE_LOG), BUILD)
|
||||
self.assertEqual(recovery.failed_instance(UPDATE_LOG.replace('\n', '\\n')), BUILD)
|
||||
for text in [UPDATE_LOG.replace('Failed to run snapcraft in instance', ''),
|
||||
UPDATE_LOG.replace(BUILD, 'other-container'),
|
||||
UPDATE_LOG + 'lxc --project snapcraft exec local:snapcraft-other-123 -- env\n',
|
||||
UPDATE_LOG.replace('failed to run apt update', 'failed to run apt upgrade'),
|
||||
'Build failed\nFailed to run snapcraft in instance\n'
|
||||
'lxc --project snapcraft exec local:' + BUILD + ' -- env\n']:
|
||||
with self.subTest(text=text), self.assertRaises(ValueError):
|
||||
recovery.failed_instance(text)
|
||||
|
||||
def test_apt_diagnostics_say_why(self):
|
||||
lines = recovery.apt_diagnostics(UPDATE_LOG)
|
||||
self.assertEqual(len(lines), 2)
|
||||
self.assertIn('Could not connect to archive.ubuntu.com', lines[0])
|
||||
self.assertIn('Some index files failed', lines[1])
|
||||
self.assertEqual(recovery.apt_diagnostics('Building\nStaged\n'), [])
|
||||
|
||||
def exercise_update(self, failures, status='Stopped'):
|
||||
"""apt-get update fails `failures` times, then succeeds."""
|
||||
calls, sleeps, left = [], [], [failures]
|
||||
def run(args, **kwargs):
|
||||
self.assertTrue(kwargs['check'])
|
||||
calls.append(args[3:])
|
||||
if args[3] == 'list':
|
||||
return subprocess.CompletedProcess(args, 0, json.dumps([{'name': BUILD, 'status': status}]))
|
||||
if args[3] == 'exec':
|
||||
self.assertEqual(args[-1], 'update')
|
||||
if left[0]:
|
||||
left[0] -= 1
|
||||
raise subprocess.CalledProcessError(100, args, 'E: Could not connect')
|
||||
return subprocess.CompletedProcess(args, 0, '')
|
||||
with patch.object(recovery.subprocess, 'run', side_effect=run):
|
||||
if failures > len(recovery.UPDATE_BACKOFF):
|
||||
with self.assertRaises(subprocess.CalledProcessError):
|
||||
recovery.refresh(UPDATE_LOG, sleep=sleeps.append)
|
||||
else:
|
||||
recovery.refresh(UPDATE_LOG, sleep=sleeps.append)
|
||||
return [c[0] for c in calls], sleeps
|
||||
|
||||
def test_apt_update_outage_waits_until_the_archive_answers(self):
|
||||
self.assertEqual(self.exercise_update(0), (['list', 'start', 'exec', 'stop'], []))
|
||||
calls, sleeps = self.exercise_update(2)
|
||||
self.assertEqual(calls, ['list', 'start', 'exec', 'exec', 'exec', 'stop'])
|
||||
self.assertEqual(sleeps, list(recovery.UPDATE_BACKOFF[:2]))
|
||||
|
||||
def test_apt_update_outage_that_never_ends_is_fatal_and_bounded(self):
|
||||
calls, sleeps = self.exercise_update(len(recovery.UPDATE_BACKOFF) + 1)
|
||||
self.assertEqual(calls.count('exec'), len(recovery.UPDATE_BACKOFF) + 1)
|
||||
self.assertEqual(calls[-1], 'stop')
|
||||
self.assertEqual(sleeps, list(recovery.UPDATE_BACKOFF))
|
||||
# Bounded well inside the 90-minute snap-variants job.
|
||||
self.assertLess(sum(recovery.UPDATE_BACKOFF), 15 * 60)
|
||||
|
||||
def test_package_404_is_refreshed_once_without_waiting(self):
|
||||
sleeps = []
|
||||
def run(args, **kwargs):
|
||||
if args[3] == 'list':
|
||||
return subprocess.CompletedProcess(args, 0, json.dumps([{'name': NAME, 'status': 'Running'}]))
|
||||
raise subprocess.CalledProcessError(100, args)
|
||||
with patch.object(recovery.subprocess, 'run', side_effect=run):
|
||||
with self.assertRaises(subprocess.CalledProcessError):
|
||||
recovery.refresh(LOG, sleep=sleeps.append)
|
||||
self.assertEqual(sleeps, [])
|
||||
|
||||
def exercise(self, status='Stopped', fail=False, name=NAME, log=LOG):
|
||||
calls = []
|
||||
def run(args, **kwargs):
|
||||
|
||||
@@ -5,7 +5,7 @@ const path = require('node:path');
|
||||
const { test } = require('node:test');
|
||||
const root = path.resolve(__dirname, '..');
|
||||
|
||||
test('managed APT recovery handles package 404s and rejects unrelated failures', () => {
|
||||
test('managed APT recovery handles package 404s and apt update outages, and rejects unrelated failures', () => {
|
||||
const result = spawnSync('python3', ['-B', 'tests/snap-managed-apt.py'], {
|
||||
cwd: root, encoding: 'utf8', timeout: 10000,
|
||||
});
|
||||
@@ -20,7 +20,7 @@ test('native and variant Snap jobs allow exactly one guarded recovery', () => {
|
||||
// Pinned to a commit of v1 (tests/workflowHardening.test.cjs).
|
||||
assert.equal((job.match(/uses: snapcore\/action-build@[0-9a-f]{40} # v1\./g) || []).length, 2);
|
||||
assert.match(job, /id: build-first\s+continue-on-error: true/);
|
||||
assert.match(job, /Refresh stale managed APT indexes after a package 404\s+if: steps.build-first.outcome == 'failure'\s+run: sudo .*snap-refresh-managed-apt.py/);
|
||||
assert.match(job, /Refresh managed APT after a package 404 or a failed apt update\s+if: steps.build-first.outcome == 'failure'\s+run: sudo .*snap-refresh-managed-apt.py/);
|
||||
assert.match(job, /id: build-retry\s+if: steps.build-first.outcome == 'failure'\s+uses:/);
|
||||
assert.match(job, /BUILT_SNAP: \$\{\{ steps.build-first.outputs.snap \|\| steps.build-retry.outputs.snap \}\}/);
|
||||
assert.match(job, /test -n "\$BUILT_SNAP"\s+test -f "\$BUILT_SNAP"/);
|
||||
|
||||
Reference in new issue
Block a user