1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 13:29:11 +01:00

update k8s to v1.33

Signed-off-by: dongjiang <dongjiang1989@126.com>
This commit is contained in:
dongjiang
2025-04-28 10:12:24 +08:00
parent 6e9622bf41
commit a249c9baf0
1273 changed files with 79284 additions and 28462 deletions

View File

@@ -281,3 +281,18 @@ headers:
}
return result
}
// isValidChallengeKey checks if the argument meets RFC6455 specification.
func isValidChallengeKey(s string) bool {
// From RFC6455:
//
// A |Sec-WebSocket-Key| header field with a base64-encoded (see
// Section 4 of [RFC4648]) value that, when decoded, is 16 bytes in
// length.
if s == "" {
return false
}
decoded, err := base64.StdEncoding.DecodeString(s)
return err == nil && len(decoded) == 16
}