Closed djay closed 2 months ago
Specifically this check was removed
Not sure what you mean, that check is still there on both the 8.x and main branches.
To me it looks like None is already filtered out correctly in _get_users, but the code is missing a similar filter in _principal_search_results
Problem
Some how you can get your site into a situation where you can no longer search users
How to reproduce
Not sure yet how this came about but we suspect its a combination of switching to email login and/or generated user ids and then deleting some users. This seemed to result in user properties not being deleted by the users in acl_users source were deleted.
After this you end up getting the following exception on a user search.
Proposed solution
Seems to be related to this code - https://github.com/plone/plone.restapi/commit/f77182b5700d059b6aee0f8f0bcc7a3fa29e3696
Specifically this check was removed https://github.com/plone/plone.restapi/commit/f77182b5700d059b6aee0f8f0bcc7a3fa29e3696#diff-04e041a4f39e375b78c8add4e71438d9d78988fd9c5e30e69cbbd51e9d09553aL74
There are likely two parts to a fix.