From c57a358c9d2aa1d286543291d876a571ab99e502 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sun, 13 Nov 2016 12:08:24 -0800 Subject: [PATCH] Validate date header only for Signed{,V2} and StreamingSigned. (#3248) Fixes #2941 --- cmd/generic-handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/generic-handlers.go b/cmd/generic-handlers.go index 1ae9a8c80..0ac6fbd75 100644 --- a/cmd/generic-handlers.go +++ b/cmd/generic-handlers.go @@ -194,7 +194,7 @@ func setTimeValidityHandler(h http.Handler) http.Handler { func (h timeValidityHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { aType := getRequestAuthType(r) - if aType != authTypeAnonymous && aType != authTypeJWT { + if aType == authTypeSigned || aType == authTypeSignedV2 || aType == authTypeStreamingSigned { // Verify if date headers are set, if not reject the request amzDate, apiErr := parseAmzDateHeader(r) if apiErr != ErrNone {