Merge branch 'master' of https://github.com/seaweedfs/seaweedfs
This commit is contained in:
@@ -51,7 +51,7 @@ COPY --from=builder /go/src/github.com/seaweedfs/seaweedfs/docker/entrypoint.sh
|
|||||||
|
|
||||||
# Install dependencies and create non-root user
|
# Install dependencies and create non-root user
|
||||||
RUN apk upgrade --no-cache zlib && \
|
RUN apk upgrade --no-cache zlib && \
|
||||||
apk add --no-cache fuse curl su-exec && \
|
apk add --no-cache fuse curl su-exec libgcc && \
|
||||||
addgroup -g 1000 seaweed && \
|
addgroup -g 1000 seaweed && \
|
||||||
adduser -D -u 1000 -G seaweed seaweed
|
adduser -D -u 1000 -G seaweed seaweed
|
||||||
|
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ var (
|
|||||||
|
|
||||||
// SSECustomerKey represents a customer-provided encryption key for SSE-C
|
// SSECustomerKey represents a customer-provided encryption key for SSE-C
|
||||||
type SSECustomerKey struct {
|
type SSECustomerKey struct {
|
||||||
Algorithm string
|
Algorithm string
|
||||||
Key []byte
|
Key []byte
|
||||||
KeyMD5 string
|
KeyMD5 string
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsSSECRequest checks if the request contains SSE-C headers
|
// IsSSECRequest checks if the request contains SSE-C headers
|
||||||
@@ -119,8 +119,8 @@ func validateAndParseSSECHeaders(algorithm, key, keyMD5 string) (*SSECustomerKey
|
|||||||
sum := md5.Sum(keyBytes)
|
sum := md5.Sum(keyBytes)
|
||||||
expectedMD5 := base64.StdEncoding.EncodeToString(sum[:])
|
expectedMD5 := base64.StdEncoding.EncodeToString(sum[:])
|
||||||
|
|
||||||
// Debug logging for MD5 validation
|
// Debug logging for MD5 validation (never log key material)
|
||||||
glog.V(4).Infof("SSE-C MD5 validation: provided='%s', expected='%s', keyBytes=%x", keyMD5, expectedMD5, keyBytes)
|
glog.V(4).Infof("SSE-C MD5 validation: provided='%s', expected='%s'", keyMD5, expectedMD5)
|
||||||
|
|
||||||
if keyMD5 != expectedMD5 {
|
if keyMD5 != expectedMD5 {
|
||||||
glog.Errorf("SSE-C MD5 mismatch: provided='%s', expected='%s'", keyMD5, expectedMD5)
|
glog.Errorf("SSE-C MD5 mismatch: provided='%s', expected='%s'", keyMD5, expectedMD5)
|
||||||
|
|||||||
Reference in New Issue
Block a user