diff options
author | Richard Hughes <richard@hughsie.com> | 2008-05-22 18:21:46 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2008-05-22 18:22:53 +0100 |
commit | 060a1ccd4095c52db975104746b16c4a5bc6b34b (patch) | |
tree | f41f34b00dd6db315b58f44663edc750e7265bda | |
parent | 2ccd2e3503eeaca3b634ec05a97b8a297edb7958 (diff) |
yum: convert ';' chars in update description in to ',' to prevent a crash like in rh#447347
-rw-r--r-- | backends/yum/helpers/yumBackend.py | 4 | ||||
-rwxr-xr-x | backends/yum2/helpers/yumDBUSBackend.py | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py index 9dc594095..3a39014c8 100644 --- a/backends/yum/helpers/yumBackend.py +++ b/backends/yum/helpers/yumBackend.py @@ -1331,6 +1331,10 @@ class PackageKitYumBackend(PackageKitBaseBackend): typ = ref['type'] href = ref['href'] title = ref['title'] or "" + + # Description can sometimes have ';' in them, and we use that as the delimiter + title = title.replace(";",",") + if href: if typ in ('bugzilla','cve'): urls[typ].append("%s;%s" % (href,title)) diff --git a/backends/yum2/helpers/yumDBUSBackend.py b/backends/yum2/helpers/yumDBUSBackend.py index 8a44d47c1..91d612ee9 100755 --- a/backends/yum2/helpers/yumDBUSBackend.py +++ b/backends/yum2/helpers/yumDBUSBackend.py @@ -1801,6 +1801,10 @@ class PackageKitYumBackend(PackageKitBaseBackend): type_ = ref['type'] href = ref['href'] title = ref['title'] or "" + + # Description can sometimes have ';' in them, and we use that as the delimiter + title = title.replace(";",",") + if href: if type_ in ('bugzilla', 'cve'): urls[type_].append("%s;%s" % (href, title)) |