fix the null byte replace

This commit is contained in:
David Christofas
2022-07-06 17:11:18 +02:00
parent 2707c2f4b4
commit 00a27bfff4
2 changed files with 2 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ var (
">", "\\>",
";", "\\;",
"=", "\\=",
"\000", "\\\000",
"\000", "\\00",
)
)

View File

@@ -20,6 +20,6 @@ var _ = Describe("ldap", func() {
Entry("only one space", " ", "\\ "),
Entry("two spaces", " ", "\\ \\ "),
Entry("ending with space", "foobar ", "foobar\\ "),
Entry("containing multiple special chars", `f+o>o,b<a;r="\00"`, `f\+o\>o\,b\<a\;r\=\\"\\00\\"`),
Entry("containing multiple special chars", "f+o>o,b<a;r=\"\000", `f\+o\>o\,b\<a\;r\=\\"\00`),
)
})