Skip to content

Commit

Permalink
fix the null byte replace
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christofas committed Jul 6, 2022
1 parent 2707c2f commit 00a27bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ocis-pkg/ldap/ldap.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var (
">", "\\>",
";", "\\;",
"=", "\\=",
"\000", "\\\000",
"\000", "\\00",
)
)

Expand Down
2 changes: 1 addition & 1 deletion ocis-pkg/ldap/ldap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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`),
)
})

0 comments on commit 00a27bf

Please sign in to comment.