From 1440879257451629fd4687052cf9380c33a1f986 Mon Sep 17 00:00:00 2001 From: Zafer Balkan Date: Mon, 9 Feb 2026 16:59:51 +0200 Subject: [PATCH] Fixed typo in the ctor that would throw NullReferenceException for unbound field access instead of NotSupportedException --- TechnitiumLibrary.Security.OTP/Authenticator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TechnitiumLibrary.Security.OTP/Authenticator.cs b/TechnitiumLibrary.Security.OTP/Authenticator.cs index a4bdf428..a1f2f3d6 100644 --- a/TechnitiumLibrary.Security.OTP/Authenticator.cs +++ b/TechnitiumLibrary.Security.OTP/Authenticator.cs @@ -43,7 +43,7 @@ public class Authenticator public Authenticator(AuthenticatorKeyUri keyUri) { if (!keyUri.Type.Equals("totp", StringComparison.OrdinalIgnoreCase)) - throw new NotSupportedException($"The authenticator key URI type '{_keyUri.Type}' is not supported."); + throw new NotSupportedException($"The authenticator key URI type '{keyUri.Type}' is not supported."); _keyUri = keyUri; _key = Base32.FromBase32String(_keyUri.Secret);