kopia lustrzana https://github.com/gaul/s3proxy
rodzic
8c9bfe5ea5
commit
b9e0714b2d
|
@ -488,6 +488,10 @@ public class S3ProxyHandler {
|
|||
long expires = Long.parseLong(expiresString);
|
||||
long nowSeconds = System.currentTimeMillis() / 1000;
|
||||
if (nowSeconds >= expires) {
|
||||
throw new S3Exception(S3ErrorCode.ACCESS_DENIED,
|
||||
"Request has expired");
|
||||
}
|
||||
if (expires - nowSeconds > TimeUnit.DAYS.toSeconds(365)) {
|
||||
throw new S3Exception(S3ErrorCode.ACCESS_DENIED);
|
||||
}
|
||||
}
|
||||
|
@ -503,6 +507,9 @@ public class S3ProxyHandler {
|
|||
throw new S3Exception(S3ErrorCode.ACCESS_DENIED,
|
||||
"Request has expired");
|
||||
}
|
||||
if (expires > TimeUnit.DAYS.toSeconds(7)) {
|
||||
throw new S3Exception(S3ErrorCode.ACCESS_DENIED);
|
||||
}
|
||||
}
|
||||
// The aim ?
|
||||
switch (authHeader.authenticationType) {
|
||||
|
|
Ładowanie…
Reference in New Issue