Fatal error after using search box filter
Description
On a fresh install of FD, against an empty OpenLDAP (except for root dc), after setting up the application, users have sometimes an unrecoverable fatal error (they have to log out and back in to revover UI) :
Fatal error: Uncaught Exception: Unknown element type specified: ! in /usr/share/fusiondirectory/include/class_filter.inc:420
Stack trace:
#0 /usr/share/fusiondirectory/include/class_listing.inc(486): filter->render()
#1 /usr/share/fusiondirectory/include/simpleplugin/class_simpleManagement.inc(537): listing->render()
#2 /usr/share/fusiondirectory/plugins/admin/users/class_userManagement.inc(119): simpleManagement->renderList()
#3 /usr/share/fusiondirectory/include/simpleplugin/class_simpleManagement.inc(609): userManagement->renderList()
#4 /usr/share/fusiondirectory/include/simpleplugin/class_simpleManagement.inc(1356): simpleManagement->execute()
#5 /usr/share/fusiondirectory/plugins/admin/users/main.inc(21): simpleManagement::mainInc('userManagement')
#6 /usr/share/fusiondirectory/html/main.php(284): require('/usr/share/fusi...')
#7 {main} thrown in /usr/share/fusiondirectory/include/class_filter.inc on line 420
We are able to reproduce it each time by filtering with the search box filter in users management, then opening another menu item in "users and groups" section, and then coming back to user management. The error occurs on this last step.
Distribution Name and Version
Reproduced on Debian Stretch and Ubuntu 16.04
FusionDirectory Version
1.3-1
PHP version used
PHP 7.0.33-0+deb9u3
Origin of php packages
debian
Steps to Reproduce
- Open user management
- Type some text in search box filter
- Clic on "Apply filter"
- Navigate to another menu item (such as "Group and roles")
- Navigate back to user management
- White page is displayed with following message : "Fatal error: Uncaught Exception: Unknown element type specified: ! in /usr/share/fusiondirectory/include/class_filter.inc:420 ..." (see description for complete message)
- UI is broken until user log back in.
Reproduces how often: 100%; though,
Additional Information
Do not occur with PHP 5.
Similar issue was found (#5862 (closed)), but it looks the bug wasn't actually fixed.
Plugins used : ldapdump ldapmanager mail dsa ppolicy