#7958 traceback in idview
Opened 3 months ago by rcritten. Modified 21 days ago

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@IPA.EXAMPLE.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@IPA.EXAMPLE.COM: idoverrideuser_find('Default Trust View', '', sizelimit=0, version='2.230'): InternalError
[description of the issue]


I believe exact ID View name is required which caused the assert.
elif escape_mode==2:
for c in assertion_value:
r.append("\%02x" % ord(c)) <<<<<<<< ord() asserted

ord() will assert with TypeError when string length is more than 1. Example:
c=97 #TypeError: ord() expected string of length 1, but int found

I tried different combination of ID View names but cannot repro.

Login to comment on this ticket.

Metadata