mirror of
https://github.com/pgsty/minio.git
synced 2026-11-12 02:25:34 +03:00
Prepare SILO 20261112 release candidate
Harden IAM/bucket/import/replication policy validation, enforce tag and version authorization across read/copy/list/archive endpoints, bind SigV4 credential-scope dates and streaming trailer limits, validate HTTP SSE-KMS contexts as strict UTF-8 JSON, add release-commit and coordinated dependency gates, and pin silo-pkg v3.16.1, Console v2.7.1, mcli 20261112, Go 1.27.4, and Helm chart 7.0.5. Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
@@ -153,6 +153,9 @@ func calculateSeedSignature(r *http.Request, trailers bool) (cred auth.Credentia
|
||||
if err != nil {
|
||||
return cred, "", "", time.Time{}, ErrMalformedDate
|
||||
}
|
||||
if signV4Values.Credential.scope.date.Format(yyyymmdd) != date.UTC().Format(yyyymmdd) {
|
||||
return cred, "", "", time.Time{}, ErrSignatureDoesNotMatch
|
||||
}
|
||||
|
||||
// Query string.
|
||||
queryStr := req.Form.Encode()
|
||||
@@ -444,6 +447,8 @@ func (cr *s3ChunkedReader) Read(buf []byte) (n int, err error) {
|
||||
return n, err
|
||||
}
|
||||
|
||||
const maxTrailerSize = 64 * 1024
|
||||
|
||||
// readTrailers will read all trailers and populate cr.trailers with actual values.
|
||||
func (cr *s3ChunkedReader) readTrailers() error {
|
||||
if cr.debug {
|
||||
@@ -457,8 +462,12 @@ func (cr *s3ChunkedReader) readTrailers() error {
|
||||
if err == io.EOF {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return err
|
||||
}
|
||||
if v != '\r' {
|
||||
if valueBuffer.Len() >= maxTrailerSize {
|
||||
return errMalformedEncoding
|
||||
}
|
||||
valueBuffer.WriteByte(v)
|
||||
continue
|
||||
}
|
||||
@@ -468,6 +477,7 @@ func (cr *s3ChunkedReader) readTrailers() error {
|
||||
if err == io.EOF {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return err
|
||||
}
|
||||
if v != '\n' {
|
||||
return errMalformedEncoding
|
||||
@@ -483,8 +493,12 @@ func (cr *s3ChunkedReader) readTrailers() error {
|
||||
if err == io.EOF {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return err
|
||||
}
|
||||
if v != '\r' {
|
||||
if signatureBuffer.Len() >= maxTrailerSize {
|
||||
return errMalformedEncoding
|
||||
}
|
||||
signatureBuffer.WriteByte(v)
|
||||
continue
|
||||
}
|
||||
@@ -494,6 +508,7 @@ func (cr *s3ChunkedReader) readTrailers() error {
|
||||
if err == io.EOF {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return err
|
||||
}
|
||||
if string(tmp[:]) != "\n\r\n" {
|
||||
if cr.debug {
|
||||
|
||||
Reference in New Issue
Block a user