Bug 1020540 - yum.update_md.UpdateNotice.xml() does not sanitize pkg['epoch'] with the to_xml() function
Summary: yum.update_md.UpdateNotice.xml() does not sanitize pkg['epoch'] with the to_x...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 19
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1005282
TreeView+ depends on / blocked
 
Reported: 2013-10-17 21:08 UTC by Randy Barlow
Modified: 2013-12-14 03:30 UTC (History)
6 users (show)

Fixed In Version: yum-3.4.3-120.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-10 06:11:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch (24.11 KB, text/x-python)
2013-10-17 21:08 UTC, Randy Barlow
no flags Details
Patch (671 bytes, patch)
2013-10-17 21:13 UTC, Randy Barlow
zpavlas: review+
Details | Diff

Description Randy Barlow 2013-10-17 21:08:04 UTC
Created attachment 813552 [details]
Patch

In yum-3.4.3-111.fc19.noarch, the yum.update_md.UpdateNotice.xml() method wraps all of the pkg attributes with the to_xml() function, except for the epoch. This causes a regression as it used to be possible to use unicode strings for all of the attributes of a package, but now that epoch is included and not wrapped, the string concatenation causes a traceback if the errata itself contains non-ASCII characters.

I believe the fix is very simple: wrapping line 395 with the to_xml() function should solve the problem.

Comment 1 Randy Barlow 2013-10-17 21:11:53 UTC
This bug is related to two bugs I reported in RHEL 6 and Fedora 19 about the Epoch having been omitted:

https://bugzilla.redhat.com/show_bug.cgi?id=1005282
https://bugzilla.redhat.com/show_bug.cgi?id=1005288

Thanks, and let me know if you need any more information!

Comment 2 Randy Barlow 2013-10-17 21:13:04 UTC
Created attachment 813553 [details]
Patch

Comment 3 Zdeněk Pavlas 2013-10-18 07:48:46 UTC
Comment on attachment 813553 [details]
Patch

Ack. For completeness and consistency we should probably also add attrib=True, but quotes never appear in epoch so nevermind. A simple str(pkg['epoch'] or '0') would work, too.

Comment 4 Fedora Update System 2013-12-04 16:32:12 UTC
yum-3.4.3-119.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/yum-3.4.3-119.fc19

Comment 5 Fedora Update System 2013-12-04 16:34:39 UTC
yum-3.4.3-119.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/yum-3.4.3-119.fc20

Comment 6 Fedora Update System 2013-12-05 00:38:29 UTC
Package yum-3.4.3-119.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing yum-3.4.3-119.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-22706/yum-3.4.3-119.fc20
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-12-06 14:24:38 UTC
yum-3.4.3-120.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/yum-3.4.3-120.fc19

Comment 8 Fedora Update System 2013-12-06 14:32:59 UTC
yum-3.4.3-120.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/yum-3.4.3-120.fc20

Comment 9 Fedora Update System 2013-12-10 06:11:49 UTC
yum-3.4.3-120.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2013-12-14 03:30:35 UTC
yum-3.4.3-120.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.