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.
This commit is contained in:
Chris Lu
2026-01-02 20:53:39 -08:00
parent 643558fcc9
commit 8001c3747d
+1 -2
View File
@@ -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() {