Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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()`.
- Loading branch information
1 parent
813a903
commit 729c20c
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters