From 801b0ab268bb9ebae1cd866500c69c26ab499bcc Mon Sep 17 00:00:00 2001 From: Heimdall Date: Fri, 13 Nov 2026 22:01:17 +0000 Subject: [PATCH] Passkeys: junk-assertion test spends enough to show a permit leak Co-Authored-By: Claude Sonnet 5.5 --- tests/Bifrost.Web.Tests/PasskeyTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Bifrost.Web.Tests/PasskeyTests.cs b/tests/Bifrost.Web.Tests/PasskeyTests.cs index 04dff41..e81def8 100644 --- a/tests/Bifrost.Web.Tests/PasskeyTests.cs +++ b/tests/Bifrost.Web.Tests/PasskeyTests.cs @@ -847,8 +847,8 @@ public sealed class PasskeyTests var thief = new SoftwareAuthenticator(); for (var i = 0; i < PasskeyRateLimit.Permits + 5; i++) { - // Half malformed, half a complete assertion by a key the account does not hold: both fail before anything is spent. - var fields = i % 2 == 0 ? new Dictionary { ["rawId"] = "AAAA" } : thief.Assert(json); + // Some malformed, most a complete assertion by a key the account does not hold: both fail before anything is spent. + var fields = i % 5 == 0 ? new Dictionary { ["rawId"] = "AAAA" } : thief.Assert(json); var junk = await PostAssertion(host, member, fields, member.Patreon); Assert.Equal(Page + "?result=passkey_failed", Location(junk.Response)); }