Integrate R1 adversarial review repairs

Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
Feng Ruohang
2026-11-03 22:45:14 +08:00
6 changed files with 416 additions and 29 deletions
+9
View File
@@ -2045,6 +2045,9 @@ func (er erasureObjects) DeleteObject(ctx context.Context, bucket, object string
// expiration attempted on a bucket with no lifecycle
// rules shall be rejected.
if lc == nil && opts.Expiration.Expire {
if !opts.Transition.ExpireRestored {
return objInfo, errLifecycleNotApplicable
}
if opts.VersionID != "" {
return objInfo, VersionNotFound{
Bucket: bucket,
@@ -2089,6 +2092,9 @@ func (er erasureObjects) DeleteObject(ctx context.Context, bucket, object string
isErr = true
}
if isErr {
if !opts.Transition.ExpireRestored {
return goi, errLifecycleNotApplicable
}
if goi.VersionID != "" {
return goi, VersionNotFound{
Bucket: bucket,
@@ -2164,6 +2170,9 @@ func (er erasureObjects) DeleteObject(ctx context.Context, bucket, object string
isErr = true
}
if isErr {
if !opts.Transition.ExpireRestored {
return goi, errLifecycleNotApplicable
}
if goi.VersionID != "" {
return goi, VersionNotFound{
Bucket: bucket,