Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d35592b
merge dev into main for the v2.32.1 release
lidge-jun Aug 25, 2026
71c57ea
release: v2.32.1
lidge-jun Aug 25, 2026
d560ac6
merge dev into main for the v2.33.0 release
lidge-jun Aug 25, 2026
08ada6f
Merge pull request #2553 from lidge-jun/codex/promote-main-2330
lidge-jun Aug 25, 2026
ec51e42
release: v2.33.0
lidge-jun Aug 25, 2026
e25b653
merge dev into main for the v2.34.0 release
lidge-jun Aug 27, 2026
80fff9a
Merge pull request #2760 from lidge-jun/codex/promote-main-2340
lidge-jun Aug 27, 2026
fc4de77
Merge pull request #2826 from lidge-jun/codex/promote-main-2350
lidge-jun Aug 28, 2026
c7d8407
Merge pull request #3002 from lidge-jun/codex/promote-main-2360
lidge-jun Aug 30, 2026
54e2274
Merge pull request #3037 from lidge-jun/codex/promote-main-2370
lidge-jun Aug 31, 2026
2c4dca1
merge dev into the promotion branch for v2.38.0
lidge-jun Aug 31, 2026
a34e8b7
merge dev into the promotion branch for v2.38.0 (picks up the ReDoS fix)
lidge-jun Aug 31, 2026
ebb4d55
Merge pull request #3073 from lidge-jun/codex/promote-main-2380
lidge-jun Aug 31, 2026
682112e
Merge remote-tracking branch 'origin/dev' into codex/promote-main-2390
lidge-jun Sep 1, 2026
af6113a
merge dev into main for the v2.39.0 release
lidge-jun Sep 1, 2026
847f4f1
merge dev into main for the v2.40.0 release
Sep 2, 2026
ac78647
Merge pull request #3261 from lidge-jun/codex/promote-main-2400
lidge-jun Sep 2, 2026
aaa9eaf
fix(release): pass the bump job's permissions through the reusable-wo…
lidge-jun Sep 2, 2026
35ff3a4
Merge pull request #3263 from lidge-jun/codex/promote-main-2400-relfix
lidge-jun Sep 2, 2026
c344a84
fix(security): prevent shared-source pairing lockout
luvs01 Sep 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ jobs:
bump-dev-version:
needs: publish
if: ${{ inputs.dry-run != true }}
# A reusable-workflow CALL cannot grant the callee more than the calling job holds,
# and GitHub refuses the whole run at startup when the called workflow's own job
# declares permissions the caller did not pass down ("startup_failure", runs
# 33615174183 / 33615177849 — the first dispatches since #3129 wired this call).
# The callee's job declares exactly these two; nothing else in this file gains them.
permissions:
contents: write
pull-requests: write
uses: ./.github/workflows/dev-version-bump.yml
with:
released-version: v${{ inputs.version }}
Expand Down
15 changes: 4 additions & 11 deletions src/server/gui-session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,19 +341,12 @@ export function consumeGuiPairingGrant(
tailscaleUser: null,
browserOrigin,
};
const sourceRecord = attemptContext
? pairingSourceAttempts.get(state)?.get(pairingSourceKey(context))
: undefined;
if (sourceRecord && sourceRecord.windowStartedAt + PAIRING_SOURCE_WINDOW_MS > now
&& sourceRecord.failures >= PAIRING_SOURCE_FAILURE_LIMIT) {
return {
allowed: false,
retryAfterSeconds: Math.max(1, Math.ceil((sourceRecord.windowStartedAt + PAIRING_SOURCE_WINDOW_MS - now) / 1000)),
reason: "source",
};
}
// Source throttling is only a cost bound for invalid guesses. Look up the grant
// first so callers sharing a proxy address cannot lock out a valid redemption.
const found = findPairingGrant(grant, state);
if (!found) {
// Cross-origin browser requests must not create limiter state as a side effect.
if (!isRemoteGuiBrowserOriginAllowed(browserOrigin, config)) return null;
const source = recordSourceFailure(state, context, now);
return attemptContext && !source.allowed ? source : null;
}
Expand Down
26 changes: 25 additions & 1 deletion tests/server-management-auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ describe("management and data-plane credential separation", () => {
)).toBeNull();
});

test("pairing burns a grant after five failures and rate-limits a source after ten guesses", () => {
test("pairing burns a grant after five failures and rate-limits allowed-origin guesses without locking out valid grants", () => {
const config = hubConfig();
const state = initializeManagementAuthState(config);
if (!state.available) throw new Error("expected management auth state");
Expand Down Expand Up @@ -1127,6 +1127,30 @@ describe("management and data-plane credential separation", () => {
}
expect(consumeGuiPairingGrant(validOrigin, { grant: `ocx_pair_${"z".repeat(43)}` }, config, state, now + 10, guessContext))
.toMatchObject({ allowed: false, reason: "source" });

const redeemable = createGuiPairingGrant("https://dashboard.example.test", config, state, now + 11);
expect(consumeGuiPairingGrant(validOrigin, { grant: redeemable.grant }, config, state, now + 12, guessContext))
.toMatchObject({ browserOrigin: "https://dashboard.example.test", issuance: "pairing" });

const untrustedOriginContext = { ...context, peerAddress: "192.0.2.12" };
for (let attempt = 1; attempt <= 10; attempt++) {
expect(consumeGuiPairingGrant(
wrongOrigin,
{ grant: `ocx_pair_${String(attempt).padStart(43, "b")}` },
config,
state,
now + attempt,
untrustedOriginContext,
)).toBeNull();
}
expect(consumeGuiPairingGrant(
validOrigin,
{ grant: `ocx_pair_${"y".repeat(43)}` },
config,
state,
now + 11,
untrustedOriginContext,
)).toBeNull();
});

test("self logout revokes only the current GUI session and admin credentials get 403", async () => {
Expand Down
Loading