Compare commits

..
4 Commits
Author SHA1 Message Date
github-actions[bot] 58cc90526e Bump versions for v13.27 2026-11-22 09:04:59 +00:00
Lauri Ojansivu d6f3707d59 Prepare v13.27 release 2026-11-22 11:04:05 +02:00
Lauri Ojansivu 942349f9de Update WeKan changelog: CodeQL alert #611, autolink rules in linear time.
Thanks to GitHub CodeQL and xet7 !
2026-11-22 10:47:43 +02:00
Lauri Ojansivu 25e9d02517 Autolink rules: existing links are found in linear time.
GitHub CodeQL code scanning alert #611 (js/polynomial-redos, high):
the spans of existing markdown links and href values were found with
/\[[^\]\n]*\]\([^)\n]*\)/g and /href\s*=\s*("[^"]*"|'[^']*')/gi, which
restart at every "[" (or href=") and read to the end each time. A card
description of 200,000 "[" took 25 seconds to render. The spans are now
found by one hand-written scan whose "next ] / ) / quote" positions are
computed once, so the work is linear, and a 3000-case fuzz test pins
that it finds exactly what the two expressions found.

The same shape was in the admin's own rules: a token that starts with
{number} retried (\d+) from every digit of a long run, so it now starts
only where a run of digits does.

Thanks to GitHub CodeQL and xet7 !
2026-11-22 10:27:38 +02:00
13 changed files with 166 additions and 36 deletions

No files matched your search

+31
View File
@@ -95,6 +95,37 @@ Which databases WeKan supports
</details>
# v13.27 2026-11-22 WeKan ® release
**In short:** **CodeQL** alert #611 is fixed: the **autolink rules** find the
links already in a card's text in linear time, so a description built of
thousands of brackets no longer takes seconds to render.
This release fixes the following SECURITY ISSUES found by GitHub CodeQL code scanning:
<details>
<summary><a href="https://github.com/wekan/wekan/commit/25e9d02517afe3b3334a6b6e6329dc29e343ff62">Alert #611: autolink rules find existing links in linear time</a>. Thanks to GitHub CodeQL and xet7.</summary>
`npm-packages/autolink/externalLinkRules.js` found the markdown links and
`href` values it must not rewrite with `/\[[^\]\n]*\]\([^)\n]*\)/g` and
`/href\s*=\s*("[^"]*"|'[^']*')/gi`. Both restart at every `[` (or `href="`)
and read to the end each time, so card text is quadratic work: 200,000 `[`
took 25 seconds (js/polynomial-redos, CWE-1333). One hand-written scan now
finds the same spans, with every "next `]`, `)` or quote" position computed
once. An admin's rule whose token starts with `{number}` had the same shape
on a long run of digits, and now starts only where a run begins.
`tests/externalLinkRules.test.cjs` fuzzes 3,000 texts against the two old
expressions to show the spans are unchanged, and times text built to make
them quadratic. The negative test finds no such span pattern in any autolink
module and times the other autolinks on the same text. Nothing is logged to
Admin Panel → Problems: long text is ordinary input, so there is no attempt
to tell apart from use.
</details>
Thanks to above GitHub users for their contributions and translators for their translations.
# v13.26 2026-11-22 WeKan ® release
**In short:** New **Workload and capacity**, **Budget and billing** and **Cloud
+8 -14
View File
@@ -5,6 +5,14 @@ each one changed and the project status are in
Written by `node releases/changelog-short.mjs` from CHANGELOG-big.md:
make changes there.
# v13.27 2026-11-22 WeKan ® release
**CodeQL** alert #611 is fixed: the **autolink rules** find the
links already in a card's text in linear time, so a description built of
thousands of brackets no longer takes seconds to render.
[All changes in v13.27](CHANGELOG-big.md#v1327-2026-11-22-wekan--release)
# v13.26 2026-11-22 WeKan ® release
New **Workload and capacity**, **Budget and billing** and **Cloud
@@ -45,17 +53,3 @@ products under the company's name: **37signals**, **Atlassian**, **Google** and
**Microsoft**.
[All changes in v13.23](CHANGELOG-big.md#v1323-2026-11-20-wekan--release)
# v13.22 2026-11-20 WeKan ® release
Repeating tasks of **Taskwarrior**, **Microsoft To Do**,
**Todoist**, **TickTick**, **Tasks.org**, **Vikunja**, **Super Productivity**,
**iCalendar**, **Org mode** and **Obsidian Kanban** now repeat in WeKan, and
their exports write the repeat back. **Release All**
builds and pushes **wekan**, **wekan-ondra** and **wekan-gantt-gpl** to every
Snap Store channel, and **Release All Missing** adds what a release lacks,
snaps included. A **WeKan board** imported from its own export keeps all of
its Board Settings and card fields, and **Rocket.Chat** and **Fizzy** are
imported and exported.
[All changes in v13.22](CHANGELOG-big.md#v1322-2026-11-20-wekan--release)
+1 -1
View File
@@ -38,7 +38,7 @@ FROM --platform=$BUILDPLATFORM debian:trixie AS bundle
ARG TARGETARCH
ARG TARGETVARIANT
ARG VERSION=13.26
ARG VERSION=13.27
ARG DEBIAN_FRONTEND=noninteractive
COPY --chmod=755 releases/check-telemetry.py /tmp/check-telemetry.py
+1 -1
View File
@@ -1,5 +1,5 @@
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
appVersion: "v13.26.0"
appVersion: "v13.27.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.26-win64.zip](https://github.com/wekan/wekan/releases/download/v13.26/wekan-13.26-win64.zip) or newest available at https://github.com/wekan/wekan/releases/
1. [wekan-13.27-win64.zip](https://github.com/wekan/wekan/releases/download/v13.27/wekan-13.27-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.26-win64.zip` , inside it is directory `bundle`, to it copy other files:
7. Unzip `wekan-13.27-win64.zip` , inside it is directory `bundle`, to it copy other files:
```
bundle (directory)
+50 -5
View File
@@ -50,7 +50,11 @@ function parseExternalLinkRules(rulesText, aliasesText) {
const identifiers = token.split('{identifier}').length - 1;
if (numbers !== 1 || identifiers > 1 || !/^https?:\/\/[^\s]+$/i.test(url)) continue;
if (/\{identifier\}/.test(url) && !identifiers) continue;
const source = token.split(/(\{number\}|\{identifier\})/).map(part => (part === '{number}' ? '(\\d+)'
// A token that STARTS with {number} would retry (\d+) from every digit
// of a long run that is not followed by the rest of the token, which is
// quadratic in the card text; it starts only where a run of digits does.
const lead = token.startsWith('{number}') ? '(?<!\\d)' : '';
const source = lead + token.split(/(\{number\}|\{identifier\})/).map(part => (part === '{number}' ? '(\\d+)'
: part === '{identifier}' ? EXTERNAL_LINK_IDENTIFIER : externalLinkRuleEscape(part))).join('');
const order = [...token.matchAll(/\{(number|identifier)\}/g)].map(m => m[1]);
rules.push({ source, order, url, aliases });
@@ -59,12 +63,53 @@ function parseExternalLinkRules(rulesText, aliasesText) {
return rules;
}
// The spans of existing markdown links and href values, never rewritten.
// The spans of existing markdown links "[text](url)" and of href="..." /
// href='...' values, never rewritten. A hand-written scan, not a regular
// expression: /\[[^\]\n]*\]\([^)\n]*\)/g restarts at every "[" and reads to
// the end of the line each time, so a card text of many "[" (or many href="
// without a closing quote) took quadratic time (CodeQL js/polynomial-redos).
// Every "next ... at or after i" is computed once, right to left, so the
// whole scan is linear and finds exactly what those expressions found.
function externalLinkNextOf(text, stops) {
const next = new Int32Array(text.length + 1);
next[text.length] = -1;
for (let i = text.length - 1; i >= 0; i -= 1) {
next[i] = stops.includes(text[i]) ? i : next[i + 1];
}
return next;
}
function externalLinkProtectedSpans(text) {
const spans = [];
for (const re of [/\[[^\]\n]*\]\([^)\n]*\)/g, /href\s*=\s*("[^"]*"|'[^']*')/gi]) {
let match;
while ((match = re.exec(text)) !== null) spans.push([match.index, match.index + match[0].length]);
const n = text.length;
const closeBracket = externalLinkNextOf(text, ']\n');
const closeParen = externalLinkNextOf(text, ')\n');
for (let i = 0; i < n; i += 1) {
if (text[i] !== '[') continue;
const j = closeBracket[i + 1];
if (j < 0 || text[j] !== ']' || text[j + 1] !== '(') continue;
const k = closeParen[j + 2];
if (k < 0 || text[k] !== ')') continue;
spans.push([i, k + 1]);
i = k;
}
const dquote = externalLinkNextOf(text, '"');
const squote = externalLinkNextOf(text, "'");
const space = c => c !== undefined && /\s/.test(c);
const href = /href/gi;
for (let m = href.exec(text); m; m = href.exec(text)) {
const i = m.index;
let p = i + 4;
while (p < n && space(text[p])) p += 1;
if (text[p] !== '=') continue;
p += 1;
while (p < n && space(text[p])) p += 1;
const quote = text[p];
if (quote !== '"' && quote !== "'") continue;
const close = (quote === '"' ? dquote : squote)[p + 1];
if (close < 0) continue;
spans.push([i, close + 1]);
href.lastIndex = close + 1;
}
return spans;
}
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "wekan",
"version": "v13.26.0",
"version": "v13.27.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "wekan",
"version": "v13.26.0",
"version": "v13.27.0",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "wekan",
"version": "v13.26.0",
"version": "v13.27.0",
"description": "Open-Source kanban",
"private": true,
"repository": {
+3 -3
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="utf8" />
<title>WeKan REST API v13.26</title>
<title>WeKan REST API v13.27</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
@@ -498,11 +498,11 @@ data-styled.g662[id="sc-hFhjrW"]{content:"gelAUe,"}/*!sc*/
<body>
<div id="redoc"><div class="sc-dPmKWx eXwHqO redoc light" style="--navbar-height:0px;--navbar-stack-height:0px"><div hidden=""><script>try{var r=document.querySelectorAll(".redoc");r=r[r.length-1];var h=document.documentElement,p=h.classList,a=[h.getAttribute("data-bs-theme"),h.getAttribute("data-theme")];var m=p.contains("dark")||a.indexOf("dark")>-1?"dark":p.contains("light")||a.indexOf("light")>-1?"light":localStorage.getItem("redoc.colorMode");if(m!=="light"&&m!=="dark")m=matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";r.classList.remove("light","dark");r.classList.add(m)}catch(e){}</script></div><div class="sc-hHttOM iMkNMJ menu-content"><div class="sc-jokKPH fejYuX"><div data-testid="search-trigger" class="sc-cRcubC kWLWEm"><div class="sc-gzhUzI ejGLvh"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" data-component-name="icons/SearchIcon/SearchIcon" class="sc-bUAICN hRyRtS"><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-gpABuY dGxToZ"><ul data-component-name="Menu/Menu" class="sc-llaQDn gIDdEs"><div data-component-name="Menu/MenuItem" class="sc-epufQc jNyRbY menu-item-type-default" role="listitem"><a class="sc-bcyEQV eSomNa" href="/" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="true" class="sc-iMaYoB kYPxgQ"><div class="sc-bmzNle dAAsRD"><span class="sc-amuuf fiYZDR"><span data-text="WeKan REST API" class="sc-cKRyZE edpvXG">WeKan REST API</span></span></div></li></a></div><div data-component-name="Menu/MenuItem" class="sc-epufQc jNyRbY menu-item-type-default" role="listitem"><a class="sc-bcyEQV eSomNa" href="/section/production-security-concerns" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-iMaYoB dpiTia"><div class="sc-bmzNle dAAsRD"><span class="sc-amuuf fiYZDR"><span data-text="Production Security Concerns" class="sc-cKRyZE cXpWdQ">Production Security Concerns</span></span></div></li></a></div><div data-component-name="Menu/MenuItem" class="sc-epufQc jNyRbY menu-item-type-group" role="listitem"><a class="sc-bcyEQV eSomNa" href="/login" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-iMaYoB buxibf"><div class="sc-hgJgCR fyVeNP"><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-hiunUN kPiUFd"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-bmzNle dAAsRD"><span class="sc-amuuf fiYZDR"><span data-text="Login" class="sc-cKRyZE cXpWdQ">Login</span></span></div></li></a><div style="display:none;height:0px;overflow:hidden" class="sc-boLXHU DecdG"></div></div><div data-component-name="Menu/MenuItem" class="sc-epufQc jNyRbY menu-item-type-group" role="listitem"><a class="sc-bcyEQV eSomNa" href="/attachmentstoragesettings" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-iMaYoB buxibf"><div class="sc-hgJgCR fyVeNP"><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-hiunUN kPiUFd"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-bmzNle dAAsRD"><span class="sc-amuuf fiYZDR"><span data-text="AttachmentStorageSettings" class="sc-cKRyZE cXpWdQ">AttachmentStorageSettings</span></span></div></li></a><div style="display:none;height:0px;overflow:hidden" class="sc-boLXHU DecdG"></div></div><div data-component-name="Menu/MenuItem" class="sc-epufQc jNyRbY menu-item-type-group" role="listitem"><a class="sc-bcyEQV eSomNa" href="/settings" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-iMaYoB buxibf"><div class="sc-hgJgCR fyVeNP"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-Line truncated
<div id="redoc"><div class="sc-dPmKWx eXwHqO redoc light" style="--navbar-height:0px;--navbar-stack-height:0px"><div hidden=""><script>try{var r=document.querySelectorAll(".redoc");r=r[r.length-1];var h=document.documentElement,p=h.classList,a=[h.getAttribute("data-bs-theme"),h.getAttribute("data-theme")];var m=p.contains("dark")||a.indexOf("dark")>-1?"dark":p.contains("light")||a.indexOf("light")>-1?"light":localStorage.getItem("redoc.colorMode");if(m!=="light"&&m!=="dark")m=matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";r.classList.remove("light","dark");r.classList.add(m)}catch(e){}</script></div><div class="sc-hHttOM iMkNMJ menu-content"><div class="sc-jokKPH fejYuX"><div data-testid="search-trigger" class="sc-cRcubC kWLWEm"><div class="sc-gzhUzI ejGLvh"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" data-component-name="icons/SearchIcon/SearchIcon" class="sc-bUAICN hRyRtS"><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-gpABuY dGxToZ"><ul data-component-name="Menu/Menu" class="sc-llaQDn gIDdEs"><div data-component-name="Menu/MenuItem" class="sc-epufQc jNyRbY menu-item-type-default" role="listitem"><a class="sc-bcyEQV eSomNa" href="/" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="true" class="sc-iMaYoB kYPxgQ"><div class="sc-bmzNle dAAsRD"><span class="sc-amuuf fiYZDR"><span data-text="WeKan REST API" class="sc-cKRyZE edpvXG">WeKan REST API</span></span></div></li></a></div><div data-component-name="Menu/MenuItem" class="sc-epufQc jNyRbY menu-item-type-default" role="listitem"><a class="sc-bcyEQV eSomNa" href="/section/production-security-concerns" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-iMaYoB dpiTia"><div class="sc-bmzNle dAAsRD"><span class="sc-amuuf fiYZDR"><span data-text="Production Security Concerns" class="sc-cKRyZE cXpWdQ">Production Security Concerns</span></span></div></li></a></div><div data-component-name="Menu/MenuItem" class="sc-epufQc jNyRbY menu-item-type-group" role="listitem"><a class="sc-bcyEQV eSomNa" href="/login" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-iMaYoB buxibf"><div class="sc-hgJgCR fyVeNP"><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-hiunUN kPiUFd"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-bmzNle dAAsRD"><span class="sc-amuuf fiYZDR"><span data-text="Login" class="sc-cKRyZE cXpWdQ">Login</span></span></div></li></a><div style="display:none;height:0px;overflow:hidden" class="sc-boLXHU DecdG"></div></div><div data-component-name="Menu/MenuItem" class="sc-epufQc jNyRbY menu-item-type-group" role="listitem"><a class="sc-bcyEQV eSomNa" href="/attachmentstoragesettings" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-iMaYoB buxibf"><div class="sc-hgJgCR fyVeNP"><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-hiunUN kPiUFd"><path d="M11 8L6.00002 13L5.30002 12.3L9.60002 8L5.30002 3.7L6.00002 3L11 8Z"></path></svg></div><div class="sc-bmzNle dAAsRD"><span class="sc-amuuf fiYZDR"><span data-text="AttachmentStorageSettings" class="sc-cKRyZE cXpWdQ">AttachmentStorageSettings</span></span></div></li></a><div style="display:none;height:0px;overflow:hidden" class="sc-boLXHU DecdG"></div></div><div data-component-name="Menu/MenuItem" class="sc-epufQc jNyRbY menu-item-type-group" role="listitem"><a class="sc-bcyEQV eSomNa" href="/settings" data-discover="true"><li role="none" data-testid="menu-item-label" data-active="false" class="sc-iMaYoB buxibf"><div class="sc-hgJgCR fyVeNP"><svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" color="--tree-content-color-Line truncated
<script type="module">
import { hydrate } from "https://cdn.redocly.com/redoc/v3.2.0/bundles/redoc.standalone.js";
const __redoc_definition = {"openapi":"3.2.0","info":{"title":"WeKan REST API","version":"v13.26","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.27","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 -1
View File
@@ -1,7 +1,7 @@
swagger: '2.0'
info:
title: WeKan REST API
version: v13.26
version: v13.27
description: |
The REST API allows you to control and extend WeKan with ease.
+2 -2
View File
@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
appTitle = (defaultText = "Wekan"),
# The name of the app as it is displayed to the user.
appVersion = 1326,
appVersion = 1327,
# Increment this for every release.
appMarketingVersion = (defaultText = "13.26~2026-11-22"),
appMarketingVersion = (defaultText = "13.27~2026-11-22"),
# Human-readable presentation of the app version.
minUpgradableAppVersion = 0,
+4 -4
View File
@@ -19,7 +19,7 @@
# base: core24 (not core26) · no build-base: devel · grade: stable
# ─────────────────────────────────────────────────────────────────────────────
name: wekan
version: '13.26'
version: '13.27'
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.26-${WEKAN_ARCH}.zip"
WEKAN_ZIP="wekan-13.27-${WEKAN_ARCH}.zip"
echo "Cleaning environment first"
rm -rf .build
mkdir .build
cd .build
#wget https://github.com/wekan/wekan/releases/download/v13.26/wekan-13.26-amd64.zip
#wget https://github.com/wekan/wekan/releases/download/v13.27/wekan-13.27-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.26/${WEKAN_ZIP}"
"https://github.com/wekan/wekan/releases/download/v13.27/${WEKAN_ZIP}"
unzip "${WEKAN_ZIP}"
python3 ../releases/check-telemetry.py --bundle bundle
rm "${WEKAN_ZIP}"
+60
View File
@@ -50,6 +50,66 @@ test('values are URL-encoded and cannot break out of the address', () => {
assert.equal(applyExternalLinkRules('[X:1]', r), '[X:1](https://a.example/X/1)', 'an abbreviation that is not a word is ignored');
});
// CodeQL js/polynomial-redos (#611): the protected spans were found with
// /\[[^\]\n]*\]\([^)\n]*\)/g and /href\s*=\s*("[^"]*"|'[^']*')/gi, which
// restart at every "[" (or href=") and read to the end each time. Card text
// is uncontrolled, so a description of many "[" took quadratic time.
const elapsed = fn => { const t = process.hrtime.bigint(); fn(); return Number(process.hrtime.bigint() - t) / 1e6; };
const BIG = 200000;
test('protected spans are unchanged: the scan finds what the old expressions found', () => {
const OLD = [/\[[^\]\n]*\]\([^)\n]*\)/g, /href\s*=\s*("[^"]*"|'[^']*')/gi];
const r = parseExternalLinkRules('X-{number} = https://a.example/{number}');
const alphabet = ['[', ']', '(', ')', '\n', '"', "'", 'href', 'HREF', '=', ' ', 'X-1', 'a', 'İ'];
let seed = 7;
const rand = n => { seed = (seed * 1103515245 + 12345) % 2147483648; return seed % n; };
for (let round = 0; round < 3000; round += 1) {
let text = '';
for (let i = rand(30); i > 0; i -= 1) text += alphabet[rand(alphabet.length)];
// The reference: link X-<n> wherever the OLD spans do not cover it.
const spans = [];
for (const re of OLD) { re.lastIndex = 0; let m; while ((m = re.exec(text))) spans.push([m.index, m.index + m[0].length]); }
const expected = text.replace(/X-(\d+)/g, (all, num, at) =>
(spans.some(([a, b]) => at < b && at + all.length > a) ? all : `[${all}](https://a.example/${num})`));
assert.equal(applyExternalLinkRules(text, r), expected, JSON.stringify(text));
}
});
test('negative: text built to make the old expressions quadratic is linear now', () => {
const r = parseExternalLinkRules('PROJ-{number} = https://a.example/{number}');
for (const text of ['['.repeat(BIG), '[]('.repeat(BIG / 3), 'href="'.repeat(BIG / 6), "href='".repeat(BIG / 6),
'href '.repeat(BIG / 5), `${'['.repeat(BIG)}PROJ-1`]) {
const ms = elapsed(() => applyExternalLinkRules(text, r));
assert.ok(ms < 1500, `${JSON.stringify(text.slice(0, 12))} x${text.length} took ${ms.toFixed(0)} ms`);
}
});
test('negative: a rule whose token starts with {number} does not retry every digit', () => {
const r = parseExternalLinkRules('{number}-TASK = https://a.example/{number}');
assert.equal(applyExternalLinkRules('see 12-TASK and x34-TASK', r),
'see [12-TASK](https://a.example/12) and x[34-TASK](https://a.example/34)');
assert.equal(applyExternalLinkRules('a123-TASK', r), 'a[123-TASK](https://a.example/123)', 'the whole number, never its tail');
const ms = elapsed(() => applyExternalLinkRules('1'.repeat(BIG), r));
assert.ok(ms < 1500, `a long digit run took ${ms.toFixed(0)} ms`);
});
test('negative: no other autolink module scans card text with a quadratic span pattern', () => {
const dir = path.join(__dirname, '..', 'npm-packages', 'autolink');
for (const file of fs.readdirSync(dir).filter(f => f.endsWith('.js'))) {
const code = fs.readFileSync(path.join(dir, file), 'utf8').replace(/^\s*\/\/.*$/gm, '');
assert.doesNotMatch(code, /\\\[\[\^\\\][^\]]*\]\*\\\]\\\(/, `${file}: "[...](...)" found by an unbounded regular expression`);
assert.doesNotMatch(code, /"\[\^"\]\*"/, `${file}: a quoted value found by an unbounded regular expression`);
}
const { autolinkExternalIssueReferences, autolinkWekanCardUrls: autolinkCardUrls } = require('@wekanteam/autolink');
for (const [name, fn] of [['autolinkExternalIssueReferences', t => autolinkExternalIssueReferences(t, 'PROJ-', 'https://a/')],
['autolinkCardUrls', t => autolinkCardUrls(t, () => null)]]) {
for (const text of ['['.repeat(BIG), 'https://'.repeat(BIG / 8), '/b/'.repeat(BIG / 3), '1'.repeat(BIG), 'PROJ-1 '.repeat(BIG / 7), '](PROJ-1 '.repeat(BIG / 9), 'href="PROJ-1 '.repeat(BIG / 13)]) {
const ms = elapsed(() => fn(text));
assert.ok(ms < 1500, `${name} on ${JSON.stringify(text.slice(0, 10))} took ${ms.toFixed(0)} ms`);
}
}
});
test('the markdown package imports the one copy and applies it after the #3069 pattern', () => {
const pkg = read('packages/markdown/src/template-integration.js');
// It used to carry a copy between BEGIN/END markers that this test compared