properties: fix validation of static-key in GUI (bgo#788226)

epel8
Thomas Haller 7 years ago
parent 72356d817e
commit 4867c892cf

@ -0,0 +1,33 @@
From eae01ceaeed9bf2c46a3b402fef89024dde0853b Mon Sep 17 00:00:00 2001
From: Brandon Guttersohn <bguttersohn@gmail.com>
Date: Wed, 27 Sep 2017 09:57:58 +0200
Subject: [PATCH 1/1] properties: fix validation of static-key in GUI
Otherwise it's not possible to edit a connection with static key.
[thaller@redhat.com: modified original patch and add commit message]
https://bugzilla.gnome.org/show_bug.cgi?id=788226
Fixes: 86a70095afc229f1f970b7e546390d166152cfc2
(cherry picked from commit b83f028a6da067dcc9b31555c15411f0288ebda1)
---
properties/auth-helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index c55afd1..16ff6e5 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -449,7 +449,7 @@ auth_widget_check_validity (GtkBuilder *builder, const char *contype, GError **e
} else if (!strcmp (contype, NM_OPENVPN_CONTYPE_STATIC_KEY)) {
widget = GTK_WIDGET (gtk_builder_get_object (builder, "sk_key_chooser"));
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
- if (filename && strlen (filename)) {
+ if (!filename || !filename[0]) {
g_free (filename);
g_set_error (error,
NMV_EDITOR_PLUGIN_ERROR,
--
2.13.5

@ -2,13 +2,14 @@ Summary: NetworkManager VPN plugin for OpenVPN
Name: NetworkManager-openvpn Name: NetworkManager-openvpn
Epoch: 1 Epoch: 1
Version: 1.8.0 Version: 1.8.0
Release: 2%{?dist} Release: 3%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://www.gnome.org/projects/NetworkManager/ URL: http://www.gnome.org/projects/NetworkManager/
Group: System Environment/Base Group: System Environment/Base
Source0: https://download.gnome.org/sources/NetworkManager-openvpn/1.8/%{name}-%{version}.tar.xz Source0: https://download.gnome.org/sources/NetworkManager-openvpn/1.8/%{name}-%{version}.tar.xz
Patch1: 0001-properties-fix-unusable-config-imports.patch Patch1: 0001-properties-fix-unusable-config-imports.patch
Patch2: 0002-properties-fix-validation-of-static-key-in-GUI.patch
BuildRequires: gtk3-devel BuildRequires: gtk3-devel
BuildRequires: NetworkManager-devel BuildRequires: NetworkManager-devel
@ -50,6 +51,7 @@ the OpenVPN server with NetworkManager (GNOME files).
%setup -q %setup -q
%patch1 -p1 %patch1 -p1
%patch2 -p1
%build %build
if [ ! -f configure ]; then if [ ! -f configure ]; then
@ -95,6 +97,9 @@ rm -f %{buildroot}%{_libdir}/NetworkManager/lib*.la
%{_datadir}/appdata/network-manager-openvpn.metainfo.xml %{_datadir}/appdata/network-manager-openvpn.metainfo.xml
%changelog %changelog
* Wed Sep 27 2017 Thomas Haller <thaller@redhat.com> - 1:1.8.0-3
- properties: fix validation of static-key in GUI (bgo#788226)
* Tue Sep 26 2017 Thomas Haller <thaller@redhat.com> - 1:1.8.0-2 * Tue Sep 26 2017 Thomas Haller <thaller@redhat.com> - 1:1.8.0-2
- properties: fix handling user-ca in GUI - properties: fix handling user-ca in GUI

Loading…
Cancel
Save