From e92f7ecbe1331173396f2e4b8dac1f60ea69b602 Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Fri, 19 Sep 2025 13:38:35 +0200 Subject: [PATCH] Fix regeneration of RegistrationTestData.assertion This was broken in commit 84746447188b64bb06245aacb04b2cb86a8cc14e because the `copy` method is no longer used, so `this.assertion` is no longer copied into `newValue`, and therefore `newValue.assertion` is always `None` in this `.map` call. The fix is to call `.map` on `this.assertion` (which is still the old value, which may be `Some`) instead of on `newValue.assertion` (which is always `None`). --- .../test/scala/com/yubico/webauthn/RegistrationTestData.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webauthn-server-core/src/test/scala/com/yubico/webauthn/RegistrationTestData.scala b/webauthn-server-core/src/test/scala/com/yubico/webauthn/RegistrationTestData.scala index 89c67f4f1..bd9346a40 100644 --- a/webauthn-server-core/src/test/scala/com/yubico/webauthn/RegistrationTestData.scala +++ b/webauthn-server-core/src/test/scala/com/yubico/webauthn/RegistrationTestData.scala @@ -911,7 +911,7 @@ case class RegistrationTestData( val newValue = RegistrationTestData.from(credential, keypair, attestationCertChain) newValue.copy( - assertion = newValue.assertion.map(_.regenerate(newValue)) + assertion = assertion.map(_.regenerate(newValue)) ) })