mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-10-13 02:53:52 +08:00
feat: upgrade syncthing version
This commit is contained in:
7
vendor/github.com/go-ldap/ldap/v3/ldap.go
generated
vendored
7
vendor/github.com/go-ldap/ldap/v3/ldap.go
generated
vendored
@@ -314,8 +314,6 @@ func DebugBinaryFile(fileName string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var hex = "0123456789abcdef"
|
||||
|
||||
func mustEscape(c byte) bool {
|
||||
return c > 0x7f || c == '(' || c == ')' || c == '\\' || c == '*' || c == 0
|
||||
}
|
||||
@@ -324,6 +322,7 @@ func mustEscape(c byte) bool {
|
||||
// characters in the set `()*\` and those out of the range 0 < c < 0x80,
|
||||
// as defined in RFC4515.
|
||||
func EscapeFilter(filter string) string {
|
||||
const hexValues = "0123456789abcdef"
|
||||
escape := 0
|
||||
for i := 0; i < len(filter); i++ {
|
||||
if mustEscape(filter[i]) {
|
||||
@@ -338,8 +337,8 @@ func EscapeFilter(filter string) string {
|
||||
c := filter[i]
|
||||
if mustEscape(c) {
|
||||
buf[j+0] = '\\'
|
||||
buf[j+1] = hex[c>>4]
|
||||
buf[j+2] = hex[c&0xf]
|
||||
buf[j+1] = hexValues[c>>4]
|
||||
buf[j+2] = hexValues[c&0xf]
|
||||
j += 3
|
||||
} else {
|
||||
buf[j] = c
|
||||
|
Reference in New Issue
Block a user