Ticket #10503 (closed Bug: fixed+released)

Opened 4 years ago

Last modified 4 years ago

Corrupt data in version history when using blobs

Reported by: do3cc Owned by: alecm
Priority: blocker Milestone: 4.0
Component: Versioning Version:
Keywords: Cc:

Description (last modified by do3cc) (diff)

In Products.CMFEditions.StandardModifier.CloneBlobs, files get compared and afterward a new blob file is written. When two files are similar in the beginning, the file that will be written as a new file is not pointing to its beginning any longer, thus an incomplete file gets written to the history. in the do3cc_issue59 branch I added a seek to rewind the fileobject

Change History

comment:1 Changed 4 years ago by do3cc

  • Description modified (diff)

comment:2 Changed 4 years ago by wichert

  • Priority changed from major to blocker
  • Milestone changed from 3.x to 4.0

comment:3 Changed 4 years ago by pilz

Doesn't surface always. Only if two files are uploaded which are similar in the beginning for at least as many lines which would hurt if cut away :)

comment:4 Changed 4 years ago by do3cc

And only, when files have the same length. So bugs wont be triggered that often, but this just makes it sneakier

comment:5 Changed 4 years ago by do3cc

I forgot to mention that I modified a test case to provoke that error. Its in changeset  http://dev.plone.org/collective/changeset/116935 and  http://dev.plone.org/collective/changeset/117086

comment:6 Changed 4 years ago by alecm

  • Status changed from new to assigned

Thanks for finding and fixing this. I'll integrate your changes and release ASAP.

comment:7 Changed 4 years ago by alecm

  • Status changed from assigned to closed
  • Resolution set to fixed+released

Patch applied and released in 2.0 beta 7

Note: See TracTickets for help on using tickets.