[gnome-abrt/f19] Properly handle UTF-8 filter input

Jakub Filak jfilak at fedoraproject.org
Mon Jun 23 14:33:12 UTC 2014


commit 239879b63fa821c01c512c1a967f68c68797f2bc
Author: Jakub Filak <jfilak at redhat.com>
Date:   Mon Jun 23 15:30:09 2014 +0200

    Properly handle UTF-8 filter input
    
    Signed-off-by: Jakub Filak <jfilak at redhat.com>

 ...roperly-handle-UTF-8-problem-filter-input.patch |   45 ++++++++++++++++++++
 gnome-abrt.spec                                    |    7 +++-
 2 files changed, 51 insertions(+), 1 deletions(-)
---
diff --git a/0001-Properly-handle-UTF-8-problem-filter-input.patch b/0001-Properly-handle-UTF-8-problem-filter-input.patch
new file mode 100644
index 0000000..566d28b
--- /dev/null
+++ b/0001-Properly-handle-UTF-8-problem-filter-input.patch
@@ -0,0 +1,45 @@
+From 36788b8848f4e263e5e32445b4f51910d2a71419 Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Mon, 23 Jun 2014 15:10:24 +0200
+Subject: [GNOME-ABRT PATCH] Properly handle UTF-8 problem filter input
+
+Do not compare type dbus.String with encoded type unicode.
+
+Fixes commit be1f8622b26f70b5c153138acbfe10d19e6cef4d
+
+Resolves rhbz#1086037, rbhz#1111820
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/gnome_abrt/views.py | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/gnome_abrt/views.py b/src/gnome_abrt/views.py
+index 1c30b42..ba65e5b 100644
+--- a/src/gnome_abrt/views.py
++++ b/src/gnome_abrt/views.py
+@@ -46,7 +46,8 @@ def problems_filter(model, itrtr, data):
+         def item_match(pattern, problem):
+             for i in ['component', 'reason',
+                         'executable', 'package']:
+-                val = problem[i]
++                # pattern is 'ascii' and problem[i] is 'dbus.String'
++                val = problem[i].encode('utf-8')
+                 if val and pattern in val:
+                     return True
+ 
+@@ -747,10 +748,7 @@ _("This problem has been reported, but a <i>Bugzilla</i> ticket has not"
+ 
+     @handle_problem_and_source_errors
+     def on_te_search_changed(self, entry):
+-        pattern = entry.get_text()
+-        if pattern:
+-            pattern = pattern.decode('utf-8')
+-        self._filter.set_pattern(pattern)
++        self._filter.set_pattern(entry.get_text())
+ 
+     def on_gac_opt_all_problems_activate(self, action):
+         conf = config.get_configuration()
+-- 
+1.8.3.1
+
diff --git a/gnome-abrt.spec b/gnome-abrt.spec
index 0837c35..d292225 100644
--- a/gnome-abrt.spec
+++ b/gnome-abrt.spec
@@ -6,7 +6,7 @@
 
 Name:       gnome-abrt
 Version:    0.3.7
-Release:    1%{?dist}
+Release:    2%{?dist}
 Summary:    A utility for viewing problems that have occurred with the system
 
 Group:      User Interface/Desktops
@@ -14,6 +14,8 @@ License:    GPLv2+
 URL:        https://fedorahosted.org/abrt/
 Source0:    https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz
 
+Patch:      0001-Properly-handle-UTF-8-problem-filter-input.patch
+
 # git is need for '%%autosetup -S git' which automatically applies all the
 # patches above. Please, be aware that the patches must be generated
 # by 'git format-patch'
@@ -106,6 +108,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Mon Jun 23 2014 Jakub Filak <jfilak at redhat.com> - 0.3.7-2
+- Properly handle UTF-8 problem filter input
+
 * Thu Jun 12 2014 Jakub Filak <jfilak at redhat.com> 0.3.7-1
 - Fix XDG_RUNTIME_DIR not set messages by creating one
 - Handle UTF-8 problem filter input


More information about the scm-commits mailing list