Browse Source

fix(s3api): restore error return when access key not found

Critical fix: The previous cleanup of sensitive logging inadvertently removed
the error return statement when access key lookup fails. This caused the code
to continue and call isCredentialExpired() on nil pointer, crashing the server.

This explains EOF errors in CORS tests - server was panicking on requests
with invalid keys.
pull/7944/head
Chris Lu 1 month ago
parent
commit
8001c3747d
  1. 3
      weed/s3api/auth_signature_v4.go

3
weed/s3api/auth_signature_v4.go

@ -233,8 +233,7 @@ func (iam *IdentityAccessManagement) verifyV4Signature(r *http.Request, shouldCh
glog.Warningf("InvalidAccessKeyId: attempted key '%s' not found. Available keys: %d, Auth enabled: %v",
authInfo.AccessKey, len(availableKeys), iam.isAuthEnabled)
}
return nil, nil, "", nil, s3err.ErrInvalidAccessKeyID }
// Check service account expiration
if cred.isCredentialExpired() {

Loading…
Cancel
Save