Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Descriptionstas-fomin@yandex.ru
2016-02-18 19:06:22 UTC
Description of problem:
python-rhsm (1.17.1) can not parse/check path for certificates with short content path (like "/test"). That is
"/test" — not OK
"/content/test" — OK
Version-Release number of selected component (if applicable):
python-rhsm (1.17.1)
How reproducible:
See example to reproduce:
https://github.com/belonesox/certificates-wtf/blob/master/certparse.py
Run certparse.py:
Steps to Reproduce:
File "/usr/lib64/python2.7/site-packages/rhsm/certificate2.py", line 558, in check_path
return self._path_tree.match_path(path)
File "/usr/lib64/python2.7/site-packages/rhsm/certificate2.py", line 526, in _path_tree
self._path_tree_object = PathTree(data)
File "/usr/lib64/python2.7/site-packages/rhsm/pathtree.py", line 63, in __init__
path_dict, path_leaves, word_dict, bitstream)
File "/usr/lib64/python2.7/site-packages/rhsm/pathtree.py", line 252, in _generate_path_tree
value.setdefault(word, []).append(path_node.value)
AttributeError: 'NoneType' object has no attribute 'value'
Actual results:
AttributeError: 'NoneType' object has no attribute 'value'
Expected results:
cert.check_path() does not raise exception, and creates internal path structures.
Hello! I'm a tester trying to determine the extent of this bug. I was wondering how you created that certificate in the first place? None of the end user tools (satellite mainly) allow me to create custom content with a path depth of 1, its always 3 or more deep when creating custom content. Your reproducer is super helpful, however any pointers on how you got that certificate would help cover our edge cases.
Comment 4stas-fomin@yandex.ru
2016-08-30 16:26:05 UTC
I spent some time looking into this, and verified that this does appear to be an edge case in the parser for certv3 in python at least. I also tried to load the content list data into one of our candlepin test cases, and it also caused an exception (though I'm not completely convinced I had the test case set up correctly). Given that there are no practical use cases that candlepin devs are aware of, this is a limitation we are probably going to leave as-is. That being said, if there are use cases that are important to you and/or you can provide more context (use case(s) and sample calls/data used to generate the cert in candlepin would be helpful), then please feel free to reopen this bug.
More context in case we revisit: I got as far as determining that the huffman code implementation we use in Python does not assign codes when the tree only has two nodes (see https://github.com/candlepin/python-rhsm/blob/c9ea6a870e789018029ac29a90f799ae238f1ea8/src/rhsm/huffman.py#L85), and I suspect this causes issues.