From be1383aed8eeb2caad102ab8026f057f43f46de6 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Sun, 28 Oct 2018 18:12:18 +0530 Subject: [PATCH] Model: Ensure name is not empty We don't need it because we don't have to open the new-config UI after scanning a QR code. This reverts commit db72e95. --- WireGuard/WireGuard/Model/Configuration.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/WireGuard/WireGuard/Model/Configuration.swift b/WireGuard/WireGuard/Model/Configuration.swift index d3d8b35..3f9b566 100644 --- a/WireGuard/WireGuard/Model/Configuration.swift +++ b/WireGuard/WireGuard/Model/Configuration.swift @@ -28,6 +28,7 @@ struct InterfaceConfiguration: Codable { init(name: String, privateKey: Data) { self.name = name self.privateKey = privateKey + if (name.isEmpty) { fatalError("Empty name") } if (privateKey.count != 32) { fatalError("Invalid private key") } } }