You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix LDAP diagnostics message used as format string (#208)
* Add GetLDAPError() tests
This patch adds a couple of tests for the `GetLDAPError()` function.
* Fix LDAP diagnostics message used as format string
The GetLDAPError()-function passes the `diagnosticMessage` error field
as the first parameter to `fmt.Errorf()`. If this message happens to
contain a `%`-character, Go will try to interpret it.
This doesn't directly lead to an error, but results in error messages
containing format string error codes. E.g.:
The error message "Detailed error message %" will result in the error
"Detailed error message %!(NOVERB)".
This patch fixes this by inserting a format string as the first
argument to `fmt.Errorf()`.
0 commit comments