aboutcode-org / univers

Parse and compare all the package versions and all the ranges. From debian, npm, pypi, ruby and more. Process all the version range specs and expressions. This project is sponsored by an NLnet project https://nlnet.nl/project/vulnerabilitydatabase/ , the Google Summer of Code, nexB and others generous sponsors!
32 stars 10 forks source link

Failure to recognize a valid Debian version #6

Open pombredanne opened 3 years ago

pombredanne commented 3 years ago
>>> from univers.debian import Version
>>> v = Version.from_string("1:1.12_1.12.6-1+deb9u1build0.18.04.1" )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pombreda/w421/vulnerablecode/venv/lib/python3.8/site-packages/univers/debian.py", line 130, in from_string
    raise ValueError('Invalid version string: "{}"'.format(version))
ValueError: Invalid version string: "1:1.12_1.12.6-1+deb9u1build0.18.04.1"
>>> 

This was found in https://ubuntu.com/security/CVE-2018-1999023 for https://tracker.debian.org/pkg/wesnoth-1.12

pombredanne commented 3 years ago

See some external implementations and pointers: