[wicd/f19] Prevent crash when saving network properties (#996693)
David Cantrell
dcantrel at fedoraproject.org
Wed Jul 2 15:26:39 UTC 2014
commit e7be2d09e5043e00edfbd8e5c68bb37cdd21ccb3
Author: David Cantrell <dcantrell at redhat.com>
Date: Wed Jul 2 11:26:06 2014 -0400
Prevent crash when saving network properties (#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 dfbf16f..107346c 100644
--- a/wicd.spec
+++ b/wicd.spec
@@ -9,7 +9,7 @@
Name: wicd
Version: 1.7.2.4
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: Wireless and wired network connection manager
Group: System Environment/Base
@@ -24,6 +24,7 @@ Patch2: wicd-1.7.0-dbus-policy.patch
Patch3: wicd-1.7.1-DaemonClosing.patch
Patch4: wicd-1.7.2.4-unicode.patch
Patch5: 770_769.diff
+Patch6: wicd-1.7.2.4-sanitize.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
BuildRequires: babel
@@ -112,6 +113,11 @@ Client program for wicd that uses a GTK+ interface.
# For https://bugzilla.redhat.com/show_bug.cgi?id=981667
%patch5 -p0
+# Fix crash when trying to save network properties.
+# Upstream bug report and patch:
+# https://bugs.launchpad.net/wicd/+bug/993912
+%patch6 -p1
+
%build
rm -f po/ast.po
%{__python} setup.py configure \
@@ -281,6 +287,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-8
+- Prevent crash when saving network properties (#996693)
+
* Mon Dec 09 2013 David Cantrell <dcantrell at redhat.com> - 1.7.2.4-7
- Apply upstream patch to fix exception when changing properties in
wicd-gtk (#981667)
More information about the scm-commits
mailing list