Loading CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr - Fix handling of optional parameters in JS runtime token generate function. - Ensure group count does not update when failing to add a member. - Handle Google IAP validation token caching when using credential overrides. - More graceful handling of no-op authoritative storage delete operations. ## [3.14.0] - 2022-10-14 ### Added Loading server/core_storage.go +6 −0 Original line number Diff line number Diff line Loading @@ -674,6 +674,12 @@ func StorageDeleteObjects(ctx context.Context, logger *zap.Logger, db *sql.DB, a return err } if authoritativeDelete && op.ObjectID.GetVersion() == "" { // If it's an authoritative delete and there is no OCC, the only reason rows affected would be 0 is having // nothing to delete. In that case it's safe to assume the deletion was just a no-op and there's no need // to check anything further. Should apply something similar to non-authoritative deletes too. continue } if rowsAffected, _ := result.RowsAffected(); rowsAffected == 0 { return StatusError(codes.InvalidArgument, "Storage delete rejected.", errors.New("Storage delete rejected - not found, version check failed, or permission denied.")) } Loading Loading
CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr - Fix handling of optional parameters in JS runtime token generate function. - Ensure group count does not update when failing to add a member. - Handle Google IAP validation token caching when using credential overrides. - More graceful handling of no-op authoritative storage delete operations. ## [3.14.0] - 2022-10-14 ### Added Loading
server/core_storage.go +6 −0 Original line number Diff line number Diff line Loading @@ -674,6 +674,12 @@ func StorageDeleteObjects(ctx context.Context, logger *zap.Logger, db *sql.DB, a return err } if authoritativeDelete && op.ObjectID.GetVersion() == "" { // If it's an authoritative delete and there is no OCC, the only reason rows affected would be 0 is having // nothing to delete. In that case it's safe to assume the deletion was just a no-op and there's no need // to check anything further. Should apply something similar to non-authoritative deletes too. continue } if rowsAffected, _ := result.RowsAffected(); rowsAffected == 0 { return StatusError(codes.InvalidArgument, "Storage delete rejected.", errors.New("Storage delete rejected - not found, version check failed, or permission denied.")) } Loading