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.
Bug 1782169 - traceback in idview
Summary: traceback in idview
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: 8.2
Assignee: Thomas Woerner
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-11 10:26 UTC by Christian Heimes
Modified: 2023-12-15 17:04 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 15:44:12 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-10352 0 None None None 2023-09-07 21:17:39 UTC
Red Hat Product Errata RHEA-2020:1640 0 None None None 2020-04-28 15:44:32 UTC

Description Christian Heimes 2019-12-11 10:26:50 UTC
This bug is created as a clone of upstream ticket:
https://pagure.io/freeipa/issue/7958

### Issue

Reported in irc by Sokol trying to look at idviews. He repaired the issue by removing and re-adding all views.

== /var/log/httpd/error_log ==
[Tue May 21 22:14:32.778871 2019] [:warn] [pid 2153:tid 139938951522048] [client 172.22.10.142:57218] failed to set perms (3140) on file (/run/ipa/ccaches/louis.abel2.COM)!, referer: https://phx-entl01.ipa.example.com/ipa/ui/
[Tue May 21 22:14:33.187218 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218] ipa: ERROR: non-public: TypeError: ord() expected string of length 1, but int found
[Tue May 21 22:14:33.187276 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218] Traceback (most recent call last):
[Tue May 21 22:14:33.187283 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]   File "/usr/lib/python3.6/site-packages/ipaserver/rpcserver.py", line 370, in wsgi_execute
[Tue May 21 22:14:33.187287 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]     result = command(*args, **options)
[Tue May 21 22:14:33.187291 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]   File "/usr/lib/python3.6/site-packages/ipalib/frontend.py", line 450, in __call__
[Tue May 21 22:14:33.187319 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]     return self.__do_call(*args, **options)
[Tue May 21 22:14:33.187324 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]   File "/usr/lib/python3.6/site-packages/ipalib/frontend.py", line 478, in __do_call
[Tue May 21 22:14:33.187328 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]     ret = self.run(*args, **options)
[Tue May 21 22:14:33.187332 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]   File "/usr/lib/python3.6/site-packages/ipalib/frontend.py", line 800, in run
[Tue May 21 22:14:33.187335 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]     return self.execute(*args, **options)
[Tue May 21 22:14:33.187339 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]   File "/usr/lib/python3.6/site-packages/ipaserver/plugins/baseldap.py", line 2072, in execute
[Tue May 21 22:14:33.187343 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]     self, ldap, entries, truncated, *args, **options
[Tue May 21 22:14:33.187347 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]   File "/usr/lib/python3.6/site-packages/ipaserver/plugins/idviews.py", line 1176, in post_callback
[Tue May 21 22:14:33.187351 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]     ldap, entries, truncated, *args, **options)
[Tue May 21 22:14:33.187365 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]   File "/usr/lib/python3.6/site-packages/ipaserver/plugins/idviews.py", line 873, in post_callback
[Tue May 21 22:14:33.187502 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]     self.obj.convert_anchor_to_human_readable_form(entry, **options)
[Tue May 21 22:14:33.187509 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]   File "/usr/lib/python3.6/site-packages/ipaserver/plugins/idviews.py", line 745, in convert_anchor_to_human_readable_form
[Tue May 21 22:14:33.187520 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]     anchor
[Tue May 21 22:14:33.187524 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]   File "/usr/lib/python3.6/site-packages/ipaserver/plugins/idviews.py", line 644, in resolve_anchor_to_object_name
[Tue May 21 22:14:33.187528 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]     name = domain_validator.get_trusted_domain_object_from_sid(sid)
[Tue May 21 22:14:33.187537 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]   File "/usr/lib/python3.6/site-packages/ipaserver/dcerpc.py", line 497, in get_trusted_domain_object_from_sid
[Tue May 21 22:14:33.187611 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]     2  # 2 means every character needs to be escaped
[Tue May 21 22:14:33.187616 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]   File "/usr/lib64/python3.6/site-packages/ldap/filter.py", line 36, in escape_filter_chars
[Tue May 21 22:14:33.187620 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218]     r.append("\\\\%02x" % ord(c))
[Tue May 21 22:14:33.187627 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218] TypeError: ord() expected string of length 1, but int found
[Tue May 21 22:14:33.187637 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218] 
[Tue May 21 22:14:33.187993 2019] [wsgi:error] [pid 2147:tid 139939151333120] [remote 172.22.10.142:57218] ipa: INFO: [jsonserver_session] louis.abel2.COM: idoverrideuser_find('Default Trust View', '', sizelimit=0, version='2.230'): InternalError
[description of the issue]

Comment 1 Christian Heimes 2019-12-11 10:28:19 UTC
The issue is caused by an invalid call to escape_filter_chars(). The function is called with bytes but only works with text. The fix is trivial.

Comment 2 Christian Heimes 2019-12-12 08:59:38 UTC
Fixed upstream
master:
https://pagure.io/freeipa/c/c30a0c22681ec4a5d6cdf341a69d144f6ab3a0a8

Comment 5 Christian Heimes 2019-12-12 12:39:14 UTC
Fixed upstream
ipa-4-8:
https://pagure.io/freeipa/c/9462e4c4b6e37fd1178f96d6d901db8d115c4cfb

Comment 13 Varun Mylaraiah 2020-02-20 07:40:42 UTC
Verified SanityOnly 

https://idm-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/trigger-test-suite/job/master/1684/console

Based on the test result, marking the bug VERIFIED.

Comment 15 errata-xmlrpc 2020-04-28 15:44:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:1640


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