Ticket #8967 (closed Bug: fixed)

Opened 5 years ago

Last modified 4 years ago

CMFEditions give KeyError if version selector is negative

Reported by: zjs2k Owned by: alecm
Priority: minor Milestone: 3.3.5
Component: Versioning Version:
Keywords: CMFEditions Cc:

Description

Whenever a negative version selector is used, a KeyError will generated.

Fix:
In file Products.CMFEditions.ZVCStorageTool.py:
874: if selector < 0:
875: selector = length - selector

When selector < 0, you need to + a negative number, not -, which will make selector go out of range. Change line 875 to:
875: selector = length + selector

Change History

comment:1 Changed 4 years ago by alecm

  • Status changed from new to closed
  • Resolution set to fixed

Indeed. Fixed in r111468

Note: See TracTickets for help on using tickets.