Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.
TypeScript browser-shellcontrol-planefile-managerhomelabmobile-firstnextjsptyreactself-hostedserver-managementshadcn-uisysadmintailwindcssterminaltypescriptvpsweb-desktopweb-terminal
test(security): assert oversized admission before body transfer
Abdurrahman Fakhrul165b1c2cbbe8
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex e32fc476..79eaf8da 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -21,6 +21,7 @@ this is the *what*, and it is what Settings → Account → About shows as “Wh**Tests**+- `security` assert oversized admission before body transfer- `security` preserve regressions without synthetic scanner matches- `security` exercise managed app authorization on its actual host- `workflow` pin grant fixture time during revocation checksdiff --git a/docs/PROGRESS.md b/docs/PROGRESS.mdindex 33c84561..2f3d6278 100644--- a/docs/PROGRESS.md+++ b/docs/PROGRESS.md@@ -2,6 +2,8 @@Post-release GitHub checks found two test-only matches. The growing-file regression now changes bytes through the already-open descriptor, preserving the actual-byte limit assertion without introducing a pathname check/reopen race in its fixture. Agent Vault constructs its deterministic redaction fixture from pieces; the original historical Gitleaks fingerprint is narrowly recorded after verifying every reachable commit. No production credential, scanner rule or release gate is excluded.+The public body admission journey sends oversized Content-Length headers before sending bytes, directly asserting HTTP 413 before body consumption without racing Undici's writer against the intended connection close. Eight actual near-limit bodies and the exact 200 MiB streamed authenticated upload remain required, with the same memory bound.+## 2026-10-09: Keep live-grant revocation tests independent of host loadThe release lane rejected an epoch-revocation fixture before its first action: a fresh one-second grant can expire while the shared host is busy. Pin the fixture clock and advance it only for the dedicated expiry case. Every actual revocation, demotion, logout, epoch and expiry assertion remains active; production authorization and release gates are unchanged.diff --git a/scripts/e2e/request-bodies.mjs b/scripts/e2e/request-bodies.mjsindex 31f9df2e..fab8781e 100644--- a/scripts/e2e/request-bodies.mjs+++ b/scripts/e2e/request-bodies.mjs@@ -1,6 +1,7 @@import assert from "node:assert/strict";import { readFile, stat } from "node:fs/promises";import { Readable } from "node:stream";+import { request } from "node:http";import { releaseFixture } from "./release-fixture.mjs";const fixture = await releaseFixture();@@ -9,8 +10,13 @@ try {const baseline = await rss(); let peak = baseline;const sample = setInterval(() => { void rss().then(value => { peak = Math.max(peak, value); }).catch(() => {}); }, 20);try {- const oversized = await fetch(fixture.base + "/api/auth/login", { method: "POST", body: Buffer.alloc(2 * 1024 * 1024) });- assert.equal(oversized.status, 413);+ // The public gate rejects Content-Length before consuming bytes; do not race its connection close with a fetch writer.+ const oversized = await new Promise((resolve, reject) => {+ const req = request(fixture.base + "/api/auth/login", { method: "POST", headers: { "content-length": String(2 * 1024 * 1024) } }, response => { response.resume(); resolve(response.statusCode); });+ req.once("error", reject); req.setTimeout(15_000, () => req.destroy(new Error("oversized admission timed out")));+ req.flushHeaders();+ });+ assert.equal(oversized, 413);const login = await fetch(fixture.base + "/api/auth/login", { method: "POST", headers: { "content-type": "application/json", origin: fixture.base }, body: JSON.stringify({ password: fixture.password, deviceId: fixture.device }) });assert.equal(login.status, 200); const cookie = login.headers.get("set-cookie").split(";")[0];const concurrent = await Promise.all(Array.from({ length: 8 }, () => fetch(fixture.base + "/api/auth/login", { method: "POST", headers: { origin: fixture.base }, body: Buffer.alloc(900 * 1024) })));