Description of problem: When searching for users in the Webadmin Portal ('Administration -> Users -> add') it's not possible to use more than one '*' character in the search string. Only the latest character is left 'as is' and the rest are replaced by '\2a' before performing the real query. Version-Release number of selected component (if applicable): ovirt-engine-4.2.8.5-0.1.el7ev.noarch How reproducible: Always Steps to Reproduce: 1. In the webadmin portal navigate to 'Administration -> Users -> add' 2. Enter 'ad*i*' as the search string and click on 'Go' Actual results: No user is shown Expected results: The user 'admin' is shown Additional info: This bug comes from debugging a problem with the AAA LDAP extension where we expected the search string containing several '*' characters to work as it would work in a normal ldapsearch command. However, this is something not exclusive to LDAP profiles, it does not work with the 'internal' profile either.
sync2jira
This occurs not only for more than one '*' , it does not match whenever the '*' is not the last character , for example if you serach for 'admin' by "*n" you will got nothing The reason is that the code checks for the last char only to see if it is '*' and then replace it with '*' when the replacement should be for all occurrences I managed to reproduce it also from the CLI tool , for example : ovirt-aaa-jdbc-tool query --what=user --pattern="name=*n" is not working either
Verified on ovirt-engine-extension-aaa-jdbc-1.1.90-1.el7ev.noarch
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 (Important: RHV Manager (ovirt-engine) 4.4 security, bug fix, and enhancement update), 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/RHSA-2020:3247