[wicd] Prevent crash when saving network settings (#996693)

David Cantrell dcantrel at fedoraproject.org
Wed Jul 2 15:53:29 UTC 2014


commit 1828b1dd1e3b2418829eb0083b2e7363508295d2
Author: David Cantrell <dcantrell at redhat.com>
Date:   Wed Jul 2 11:53:27 2014 -0400

    Prevent crash when saving network settings (#996693)

 wicd-1.7.2.4-sanitize.patch |   30 ++++++++++++++++++++++++++++++
 wicd.spec                   |   11 ++++++++++-
 2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/wicd-1.7.2.4-sanitize.patch b/wicd-1.7.2.4-sanitize.patch
new file mode 100644
index 0000000..9722d92
--- /dev/null
+++ b/wicd-1.7.2.4-sanitize.patch
@@ -0,0 +1,30 @@
+diff -up wicd-1.7.2.4/wicd/wicd-daemon.py.sanitize wicd-1.7.2.4/wicd/wicd-daemon.py
+--- wicd-1.7.2.4/wicd/wicd-daemon.py.sanitize	2014-07-02 11:24:51.171030709 -0400
++++ wicd-1.7.2.4/wicd/wicd-daemon.py	2014-07-02 11:25:09.780030709 -0400
+@@ -1064,7 +1064,7 @@ class WirelessDaemon(dbus.service.Object
+     def SetWirelessProperty(self, netid, prop, value):
+         """ Sets property to value in network specified. """
+         # We don't write script settings here.
+-        prop = misc.sanitize_config(prop)
++        prop = misc.sanitize_config(str(prop))
+         if prop.endswith('script'):
+             print 'Setting script properties through the daemon' \
+                   + ' is not permitted.'
+@@ -1265,7 +1265,7 @@ class WirelessDaemon(dbus.service.Object
+     @dbus.service.method('org.wicd.daemon.wireless')
+     def SaveWirelessNetworkProperty(self, id, option):
+         """ Writes a particular wireless property to disk. """
+-        option = misc.sanitize_config(option)
++        option = misc.sanitize_config(str(option))
+         if option.endswith("script"):
+             print 'You cannot save script information to disk through ' + \
+                   'the daemon.'
+@@ -1408,7 +1408,7 @@ class WiredDaemon(dbus.service.Object):
+     def SetWiredProperty(self, prop, value):
+         """ Sets the given property to the given value. """
+         if self.WiredNetwork:
+-            prop = misc.sanitize_config(prop)
++            prop = misc.sanitize_config(str(prop))
+             if prop.endswith('script'):
+                 print 'Setting script properties through the daemon' \
+                       + ' is not permitted.'
diff --git a/wicd.spec b/wicd.spec
index 08de07d..90e6266 100644
--- a/wicd.spec
+++ b/wicd.spec
@@ -9,7 +9,7 @@
 
 Name:                wicd
 Version:             1.7.2.4
-Release:             10%{?dist}
+Release:             11%{?dist}
 Summary:             Wireless and wired network connection manager
 
 Group:               System Environment/Base
@@ -26,6 +26,7 @@ Patch4:              wicd-1.7.2.4-unicode.patch
 Patch5:              770_769.diff
 Patch6:              wicd-1.7.2.4-check-for-daemon.patch
 Patch7:              wicd-1.7.2.4-curses_bz894646.patch
+Patch8:              wicd-1.7.2.4-sanitize.patch
 
 BuildRoot:           %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
 BuildRequires:       babel
@@ -124,6 +125,11 @@ Client program for wicd that uses a GTK+ interface.
 # https://bugzilla.redhat.com/show_bug.cgi?id=894646
 %patch7 -p1
 
+# Prevent crash when saving network settings
+# Upstream bug report and patch:
+# https://bugs.launchpad.net/wicd/+bug/993912
+%patch8 -p1
+ 
 %build
 rm -f po/ast.po
 %{__python} setup.py configure \
@@ -293,6 +299,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_datadir}/icons/hicolor/scalable/apps/wicd-gtk.svg
 
 %changelog
+* Wed Jul 02 2014 David Cantrell <dcantrell at redhat.com> - 1.7.2.4-11
+- Prevent crash when saving network settings (#996693)
+
 * Mon Jun 30 2014 David Cantrell <dcantrell at redhat.com> - 1.7.2.4-10
 - Do not assume wicd-daemon is running when wicd-client runs (#1074315)
 - Fix wicd-curses crash on startup (#894646)


More information about the scm-commits mailing list