#1945 [ipa webui] Config - User search fields - if blank, throws error - an internal error has occurred
Closed: Fixed None Opened 12 years ago by dpal.

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

Description of problem:
Config - User search fields - if blank, throws error - an internal error has occurred


Version-Release number of selected component (if applicable):
ipa-server-2.1.1-101.20111004T0103zgita013597.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. In Configuration page, set User search fields to blank
2. Click Update


Actual results:
throws error:
an internal error has occurred
with traceback in https error.log

Expected results:
a more user friendly error message

Additional info:

trace back in the /var/log/httpd/errors_log:

[Fri Oct 07 08:52:24 2011] [error] AttributeError: 'NoneType' object has no attribute 'split'
[Fri Oct 07 08:52:24 2011] [error] ipa: INFO: admin@TESTRELM: config_mod(ipausersearchfields=[], rights=True, all=True): AttributeError
[Fri Oct 07 08:53:43 2011] [error] ipa: ERROR: non-public: AttributeError: 'NoneType' object has no attribute 'split'
[Fri Oct 07 08:53:43 2011] [error] Traceback (most recent call last):
[Fri Oct 07 08:53:43 2011] [error]   File "/usr/lib/python2.6/site-packages/ipaserver/rpcserver.py", line 223, in wsgi_execute
[Fri Oct 07 08:53:43 2011] [error]     result = self.Command[name](*args, **options)
[Fri Oct 07 08:53:43 2011] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 432, in __call__
[Fri Oct 07 08:53:43 2011] [error]     ret = self.run(*args, **options)
[Fri Oct 07 08:53:43 2011] [error]   File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 738, in run
[Fri Oct 07 08:53:43 2011] [error]     return self.execute(*args, **options)
[Fri Oct 07 08:53:43 2011] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/baseldap.py", line 991, in execute
[Fri Oct 07 08:53:43 2011] [error]     ldap, dn, entry_attrs, attrs_list, *keys, **options
[Fri Oct 07 08:53:43 2011] [error]   File "/usr/lib/python2.6/site-packages/ipalib/plugins/config.py", line 208, in pre_callback
[Fri Oct 07 08:53:43 2011] [error]     fields = entry_attrs[k].split(',')
[Fri Oct 07 08:53:43 2011] [error] AttributeError: 'NoneType' object has no attribute 'split'
[Fri Oct 07 08:53:43 2011] [error] ipa: INFO: admin@TESTRELM: config_mod(ipausersearchfields=[], rights=True, all=True): AttributeError

Suggest for 2.1.3.


This is only a problem if you blank out the field. Searching for users will bomb out.

The fix is easy enough, add back a list of attributes to search on. The default list is uid,givenname,sn,telephonenumber,ou,title

The value is a comma-delimited string.

Metadata Update from @dpal:
- Issue assigned to rcritten
- Issue set to the milestone: FreeIPA 3.0 Core Effort - 2011/11

7 years ago

Login to comment on this ticket.

Metadata