Error on users list

The user list drop error 500

[2024-04-11 14:17:34,182][12008][139690202785344][ERROR][] Exception on /user/ [GET]
Traceback (most recent call last):
File “/srv/privacyidea/lib/python3.10/site-packages/flask/”, line 2447, in wsgi_app
response = self.full_dispatch_request()
File “/srv/privacyidea/lib/python3.10/site-packages/flask/”, line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/srv/privacyidea/lib/python3.10/site-packages/flask/”, line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/srv/privacyidea/lib/python3.10/site-packages/flask/”, line 39, in reraise
raise value
File “/srv/privacyidea/lib/python3.10/site-packages/flask/”, line 1950, in full_dispatch_request
rv = self.dispatch_request()
File “/srv/privacyidea/lib/python3.10/site-packages/flask/”, line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File “/srv/privacyidea/lib/python3.10/site-packages/privacyidea/api/lib/”, line 159, in policy_wrapper
return wrapped_function(*args, **kwds)
File “/srv/privacyidea/lib/python3.10/site-packages/privacyidea/api/lib/”, line 159, in policy_wrapper
return wrapped_function(*args, **kwds)
File “/srv/privacyidea/lib/python3.10/site-packages/privacyidea/api/”, line 423, in decorated_function
return f(*args, **kwargs)
File “/srv/privacyidea/lib/python3.10/site-packages/privacyidea/lib/”, line 100, in event_wrapper
f_result = func(*args, **kwds)
File “/srv/privacyidea/lib/python3.10/site-packages/privacyidea/api/”, line 114, in get_users
return send_result(users)
File “/srv/privacyidea/lib/python3.10/site-packages/privacyidea/api/lib/”, line 118, in send_result
return jsonify(prepare_result(obj, rid, details))
File “/srv/privacyidea/lib/python3.10/site-packages/flask/json/”, line 370, in jsonify
dumps(data, indent=indent, separators=separators) + “\n”,
File “/srv/privacyidea/lib/python3.10/site-packages/flask/json/”, line 211, in dumps
rv = _json.dumps(obj, **kwargs)
File “/usr/lib/python3.10/json/”, line 238, in dumps
File “/usr/lib/python3.10/json/”, line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File “/usr/lib/python3.10/json/”, line 257, in iterencode
return _iterencode(o, 0)
File “/srv/privacyidea/lib/python3.10/site-packages/flask/json/”, line 100, in default
return _json.JSONEncoder.default(self, o)
File “/usr/lib/python3.10/json/”, line 179, in default
raise TypeError(f’Object of type {} ’
TypeError: Object of type bytes is not JSON serializable

Is there any solution?

I have put passworld fild in ldap user resolv configuration to make password reset of user. But password in list make the web site errror 500

i have made a dirt patch

def getUserList(self, searchDict=None):
    :param searchDict: A dictionary with search parameters
    :type searchDict: dict
    :return: list of users, where each user is a dictionary
    ret = []
    attributes = list(self.userinfo.values())
    # nao podemos usar a senha na lista
    ad_timestamp = get_ad_timestamp_now()
    if self.uidtype.lower() != "dn":