Bug 1544359 - dnf fails with traceback for repos containing strange characters
Summary: dnf fails with traceback for repos containing strange characters
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 27
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Marek Blaha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-12 09:34 UTC by Eva Mrakova
Modified: 2018-06-28 08:23 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-28 08:23:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Eva Mrakova 2018-02-12 09:34:42 UTC
Description of problem:
dnf fails with traceback for repositories containing in metadata <summary> or
<description> tags "strange" characters (namely characters with hexa codes between 01 and 1f)

Similar bug 1063177 has been reported for yum in the past.

Version-Release number of selected component (if applicable):
dnf-2.7.5-2.fc27.noarch

How reproducible:
always

Steps to Reproduce:
1. create a repo with "strange" characters as described above
2. run 'dnf makecache'

Actual results:
# dnf --disablerepo=\* --enablerepo=repo-strange-chars makecache
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 115, in cli_run
    cli.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1014, in run
    return self.command.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/makecache.py", line 55, in run
    return self.base.update_cache(self.opts.timer is not None)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 324, in update_cache
    self.fill_sack(load_system_repo=False, load_available_repos=True)  # performs the md sync
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 353, in fill_sack
    self._add_repo_to_sack(r)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 135, in _add_repo_to_sack
    load_updateinfo=True)
_hawkey.Exception: repo_add_repomdxml/rpmmd() has failed.


Expected results:
no traceback

Additional info:
/CoreOS/yum/Sanity/bz1063177-traceback-with-error-PCDATA-invalid-Char-value-27  can be used as a reproducer

Comment 2 Marek Blaha 2018-02-16 07:57:45 UTC
*** Bug 1545575 has been marked as a duplicate of this bug. ***

Comment 3 Jaroslav Mracek 2018-06-28 08:23:39 UTC
The issue is solved by dnf-3.0.1-1 that was released into rawhide.


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