Rößner-Network-Solutions

Skip to content

Refactor LuaLDAPSearch to validate input and enhance request creation

Christian Rößner requested to merge features into main

This commit entails significant modifications to the LuaLDAPSearch function in ldap.go. The function now accepts a Lua table as input, validates the fields, and converts them to suitable types. It constructs an LDAPRequest object with the validated and converted field values and sends the request. Additionally, the unused function convertMapToSliceOfString was removed in favor of a new, more specific function called prepareAndValidateFields. This new function validates the fields in a Lua table against expected ones. Also, new constants for "string" and "table" were added in const.go.

Signed-off-by: Christian Roessner c@roessner.co

Merge request reports

Loading