Fixed
Details
Assignee
Marko BekhtaMarko BekhtaReporter
Pasqual KoschmiederPasqual KoschmiederBug Testcase Reminder (view)
Bug reports should generally be accompanied by a test case!
Bug Testcase Reminder (edit)
Bug reports should generally be accompanied by a test case!
Participants
Marko BekhtaPasqual KoschmiederComponents
Fix versions
Affects versions
Priority
Major
Details
Details
Assignee
Marko Bekhta
Marko BekhtaReporter
Pasqual Koschmieder
Pasqual KoschmiederBug Testcase Reminder (view)
Bug reports should generally be accompanied by a test case!
Bug Testcase Reminder (edit)
Bug reports should generally be accompanied by a test case!
Participants
Marko Bekhta
Pasqual Koschmieder
Components
Fix versions
Affects versions
Priority
Created December 8, 2024 at 12:02 AM
Updated December 13, 2024 at 5:40 PM
Resolved December 12, 2024 at 11:00 AM
Using a UUID constraint which specifies a specific version to match, the version is actually ignored and all uuid versions can pass the constraint. An example would be this constraint:
which should only allow UUID version 4, however the following UUID (v5) passes the constraint as well:
This constraint & input combination results in the following state in UUIDValidator:
which correctly identified the versions from the constraint (4) and the version of the input uuid (5). However, the following binary search if the allowed versions array contains the uuid version checks for a return value of -1, which is incorrect as the method returns the possible insertion point which, in this case, can only be -2 or lower (for elements that are not yet in the array) as the array already contains one element (the insertion point is based on the order of the array, so 5 returns -2 because it would be after 4 in the array, but e.g. 3 would return -1 as it would be in front of 4):