From d40a29df71a1969024e51be02f593e0295e597c7 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 28 Dec 2018 01:32:53 -0800 Subject: [PATCH] Ensure we can't enter the app grid without having a pinned cert --- Limelight/Database/TemporaryHost.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Limelight/Database/TemporaryHost.m b/Limelight/Database/TemporaryHost.m index 4b9988f5..765dd536 100644 --- a/Limelight/Database/TemporaryHost.m +++ b/Limelight/Database/TemporaryHost.m @@ -29,10 +29,12 @@ self.mac = host.mac; self.name = host.name; self.uuid = host.uuid; - self.pairState = [host.pairState intValue]; self.serverCodecModeSupport = host.serverCodecModeSupport; self.serverCert = host.serverCert; + // Ensure we don't use a stale cached pair state if we haven't pinned the cert yet + self.pairState = host.serverCert ? [host.pairState intValue] : PairStateUnpaired; + NSMutableSet *appList = [[NSMutableSet alloc] init]; for (App* app in host.appList) {