diff options
| author | Tom Crasset <25140344+tcrasset@users.noreply.github.com> | 2025-10-25 10:11:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-25 01:11:45 -0700 |
| commit | 824dcac3bf5b75fd4b74bf83d7b08895422d4374 (patch) | |
| tree | 6abc89b9b6fa88ba474b9e96e8636a50da85ad30 /weed/s3api/s3err/s3api_errors.go | |
| parent | 6a8c53bc44beb057f64d5ba1f7ac026f8410fe04 (diff) | |
| download | seaweedfs-824dcac3bf5b75fd4b74bf83d7b08895422d4374.tar.xz seaweedfs-824dcac3bf5b75fd4b74bf83d7b08895422d4374.zip | |
s3: combine all signature verification checks into a single function (#7330)
Diffstat (limited to 'weed/s3api/s3err/s3api_errors.go')
| -rw-r--r-- | weed/s3api/s3err/s3api_errors.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/weed/s3api/s3err/s3api_errors.go b/weed/s3api/s3err/s3api_errors.go index 0d354ee8c..762289bce 100644 --- a/weed/s3api/s3err/s3api_errors.go +++ b/weed/s3api/s3err/s3api_errors.go @@ -102,6 +102,7 @@ const ( ErrContentSHA256Mismatch ErrInvalidAccessKeyID ErrRequestNotReadyYet + ErrRequestTimeTooSkewed ErrMissingDateHeader ErrInvalidRequest ErrAuthNotSetup @@ -432,6 +433,12 @@ var errorCodeResponse = map[ErrorCode]APIError{ HTTPStatusCode: http.StatusForbidden, }, + ErrRequestTimeTooSkewed: { + Code: "RequestTimeTooSkewed", + Description: "The difference between the request time and the server's time is too large.", + HTTPStatusCode: http.StatusForbidden, + }, + ErrSignatureDoesNotMatch: { Code: "SignatureDoesNotMatch", Description: "The request signature we calculated does not match the signature you provided. Check your key and signing method.", |
