From c2f744fc93ab4d842b4fff01fa612c9906ec377a Mon Sep 17 00:00:00 2001 From: Pranjal Jumde Date: Tue, 20 Aug 2019 11:09:17 -0700 Subject: [PATCH] Fix #1388: Cancel queued key sessions on cleanup (#1396) --- Client/U2FExtensions.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Client/U2FExtensions.swift b/Client/U2FExtensions.swift index 299567d0694..d73168b6fd7 100644 --- a/Client/U2FExtensions.swift +++ b/Client/U2FExtensions.swift @@ -477,6 +477,7 @@ class U2FExtensions: NSObject { } fido2RegHandles.remove(at: index) fido2RegisterRequest.removeValue(forKey: handle) + YubiKitManager.shared.keySession.cancelCommands() } // FIDO2 Authentication @@ -728,6 +729,7 @@ class U2FExtensions: NSObject { } fido2AuthHandles.remove(at: index) fido2AuthRequest.removeValue(forKey: handle) + YubiKitManager.shared.keySession.cancelCommands() } // FIDO Registration @@ -841,6 +843,7 @@ class U2FExtensions: NSObject { fidoRegHandles.remove(at: index) fidoRegisterRequest.removeValue(forKey: handle) requestId.removeValue(forKey: handle) + YubiKitManager.shared.keySession.cancelCommands() } // FIDO Authetication @@ -972,6 +975,7 @@ class U2FExtensions: NSObject { fidoSignHandles.remove(at: index) fidoSignRequests.removeValue(forKey: handle) requestId.removeValue(forKey: handle) + YubiKitManager.shared.keySession.cancelCommands() } private func handleSessionStateChange() {