fix(auth): tighten bridge claim protocol

This commit is contained in:
2026-08-16 22:44:44 +02:00
parent 7d9ca13f1d
commit 8477a69a29
7 changed files with 333 additions and 40 deletions
+3
View File
@@ -609,6 +609,9 @@ function claimOidcState(directory: string, filename: string): OidcStateClaim | u
before = fileIdentity(lstatSync(statePath) as Stats);
} catch (error) {
if (isNotFound(error)) return undefined;
// A winner can install its hard-link after the first claim check and before this state
// identity check. That process owns the state; this contender must fail closed as used.
if (oidcClaimExists(directory, filename)) return undefined;
throw invalid();
}
try {