mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 12:59:57 +00:00
TUN-9467: bump coredns to solve CVE
* TUN-9467: bump coredns to solve CVE
This commit is contained in:

committed by
João "Pisco" Fernandes

parent
f8d12c9d39
commit
a408612f26
26
vendor/google.golang.org/grpc/internal/metadata/metadata.go
generated
vendored
26
vendor/google.golang.org/grpc/internal/metadata/metadata.go
generated
vendored
@@ -97,13 +97,11 @@ func hasNotPrintable(msg string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// ValidatePair validate a key-value pair with the following rules (the pseudo-header will be skipped) :
|
||||
//
|
||||
// - key must contain one or more characters.
|
||||
// - the characters in the key must be contained in [0-9 a-z _ - .].
|
||||
// - if the key ends with a "-bin" suffix, no validation of the corresponding value is performed.
|
||||
// - the characters in the every value must be printable (in [%x20-%x7E]).
|
||||
func ValidatePair(key string, vals ...string) error {
|
||||
// ValidateKey validates a key with the following rules (pseudo-headers are
|
||||
// skipped):
|
||||
// - the key must contain one or more characters.
|
||||
// - the characters in the key must be in [0-9 a-z _ - .].
|
||||
func ValidateKey(key string) error {
|
||||
// key should not be empty
|
||||
if key == "" {
|
||||
return fmt.Errorf("there is an empty key in the header")
|
||||
@@ -119,6 +117,20 @@ func ValidatePair(key string, vals ...string) error {
|
||||
return fmt.Errorf("header key %q contains illegal characters not in [0-9a-z-_.]", key)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ValidatePair validates a key-value pair with the following rules
|
||||
// (pseudo-header are skipped):
|
||||
// - the key must contain one or more characters.
|
||||
// - the characters in the key must be in [0-9 a-z _ - .].
|
||||
// - if the key ends with a "-bin" suffix, no validation of the corresponding
|
||||
// value is performed.
|
||||
// - the characters in every value must be printable (in [%x20-%x7E]).
|
||||
func ValidatePair(key string, vals ...string) error {
|
||||
if err := ValidateKey(key); err != nil {
|
||||
return err
|
||||
}
|
||||
if strings.HasSuffix(key, "-bin") {
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user