diff options
author | Roopesh Chander <roop@roopc.net> | 2018-11-03 15:45:29 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2018-11-03 15:45:29 +0530 |
commit | 366ca7802af8f1f77f41ecf91fd32f8bf3cee082 (patch) | |
tree | 2cf1145e499842dc37097d0c8710beee5126e8b6 /WireGuard/WireGuard/UI/iOS/QRScanViewController.swift | |
parent | Zip archive: Handle files within folders inside the zip (diff) | |
download | wireguard-apple-366ca7802af8f1f77f41ecf91fd32f8bf3cee082.tar.xz wireguard-apple-366ca7802af8f1f77f41ecf91fd32f8bf3cee082.zip |
Ensure that all tunnel names are trimmed of whitespaces
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/QRScanViewController.swift | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift b/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift index 9dd298a..929b6b0 100644 --- a/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift @@ -116,7 +116,7 @@ class QRScanViewController: UIViewController { alert.addTextField(configurationHandler: nil) alert.addAction(UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .cancel, handler: nil)) alert.addAction(UIAlertAction(title: NSLocalizedString("Save", comment: ""), style: .default, handler: { [weak self] _ in - let title = alert.textFields?[0].text ?? "" + let title = alert.textFields?[0].text?.trimmingCharacters(in: .whitespacesAndNewlines) ?? "" if (title.isEmpty) { return } tunnelConfiguration.interface.name = title if let s = self { |