Do not perform signature check for OPTIONS verb

Fixes #411.
pull/604/head
momez 2022-03-23 20:39:53 +00:00 zatwierdzone przez Andrew Gaul
rodzic 19897069b4
commit 6bb0250103
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -612,8 +612,9 @@ public class S3ProxyHandler {
}
}
if (!constantTimeEquals(expectedSignature,
authHeader.getSignature())) {
// AWS does not check signatures with OPTIONS verb
if (!method.equals("OPTIONS") && !constantTimeEquals(
expectedSignature, authHeader.getSignature())) {
throw new S3Exception(S3ErrorCode.SIGNATURE_DOES_NOT_MATCH);
}
}