[NetworkManager-openconnect] Don't allow empty useragent string to be used for override
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [NetworkManager-openconnect] Don't allow empty useragent string to be used for override
- Date: Sat, 30 Apr 2022 19:35:21 +0000 (UTC)
commit 9a8533af5b3078126a51b2ac17e1df2834f7fdb6
Author: David Woodhouse <dwmw2 infradead org>
Date: Sat Apr 30 20:35:10 2022 +0100
Don't allow empty useragent string to be used for override
auth-dialog/main.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index 8aca03f..6a3b164 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -1884,6 +1884,10 @@ static auth_ui_data *init_ui_data (char *vpn_name, GHashTable *options, GHashTab
g_unix_set_fd_nonblocking(ui_data->cancel_pipes[0], TRUE, NULL);
g_unix_set_fd_nonblocking(ui_data->cancel_pipes[1], TRUE, NULL);
+ /* If it's an empty string, forget it. */
+ if (vpn_useragent && !*vpn_useragent)
+ vpn_useragent = NULL;
+
ui_data->vpninfo = (void *)openconnect_vpninfo_new(vpn_useragent ?: "OpenConnect VPN Agent
(NetworkManager)",
validate_peer_cert, write_new_config,
nm_process_auth_form, write_progress,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]