release: v0.12.0 (#520)

Forty-one commits since v0.11.0. See CHANGELOG.md for the full list and the upgrade notes.
This commit is contained in:
Ralksta
2026-08-23 23:18:14 +02:00
committed by GitHub
parent 2f546f440d
commit 10ec68f493
119 changed files with 6888 additions and 758 deletions

View File

@@ -71,6 +71,23 @@ describe('admin session tokens', () => {
expect(verifyAdminToken(createAdminToken())).toBe(true);
});
/**
* A cookie far longer than any token we issue is rejected before it is
* parsed. The decode below the signature check was never reachable without
* the key, so this is boundary hygiene rather than a fix for an exploitable
* exhaustion — but a bound on untrusted input costs nothing (#505).
*/
it('rejects an implausibly long token without parsing it', async () => {
const { createAdminToken, verifyAdminToken } = await loadAuth();
const valid = createAdminToken();
expect(valid.length).toBeLessThan(512);
expect(verifyAdminToken(valid)).toBe(true);
expect(verifyAdminToken('a'.repeat(513))).toBe(false);
// Padding a genuine token past the bound must not sneak through either.
expect(verifyAdminToken(valid + 'a'.repeat(512))).toBe(false);
});
it('rejects a token forged with the old hardcoded dev fallback secret', async () => {
const { verifyAdminToken } = await loadAuth();
// The exact key an attacker could derive from the public source before the fix.