mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
switch to new go-acme imports from xenolf. Fix api changes (#540)
* switch to new go-acme imports from xenolf. Fix api changes * update many vault related dependencies
This commit is contained in:
1
vendor/github.com/hashicorp/go-cleanhttp/go.mod
generated
vendored
Normal file
1
vendor/github.com/hashicorp/go-cleanhttp/go.mod
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
module github.com/hashicorp/go-cleanhttp
|
21
vendor/github.com/hashicorp/go-cleanhttp/handlers.go
generated
vendored
21
vendor/github.com/hashicorp/go-cleanhttp/handlers.go
generated
vendored
@ -27,17 +27,22 @@ func PrintablePathCheckHandler(next http.Handler, input *HandlerInput) http.Hand
|
||||
}
|
||||
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
// Check URL path for non-printable characters
|
||||
idx := strings.IndexFunc(r.URL.Path, func(c rune) bool {
|
||||
return !unicode.IsPrint(c)
|
||||
})
|
||||
if r != nil {
|
||||
// Check URL path for non-printable characters
|
||||
idx := strings.IndexFunc(r.URL.Path, func(c rune) bool {
|
||||
return !unicode.IsPrint(c)
|
||||
})
|
||||
|
||||
if idx != -1 {
|
||||
w.WriteHeader(input.ErrStatus)
|
||||
return
|
||||
if idx != -1 {
|
||||
w.WriteHeader(input.ErrStatus)
|
||||
return
|
||||
}
|
||||
|
||||
if next != nil {
|
||||
next.ServeHTTP(w, r)
|
||||
}
|
||||
}
|
||||
|
||||
next.ServeHTTP(w, r)
|
||||
return
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user