However, the current _VALUE_PATTERN in cpecomp2_2.py does not recognize it as valid:
>>> CPE("cpe:/a:intel:proset\/wireless_wifi").as_uri_2_3()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/chad/.pyenv/versions/service_tvdb_loader/lib/python3.10/site-packages/cpe/cpe.py", line 311, in __new__
raise NotImplementedError(errmsg)
NotImplementedError: Version of CPE not implemented
With the changes in this PR, this CPE becomes recognized as valid:
>>> from cpe.comp.cpecomp2_2 import CPEComponent2_2
>>> from cpe import CPE
>>> import re
>>> CPEComponent2_2._value_rxc = re.compile(r"^([\d\w\._\-~%\\/]+)$")
>>> CPE("cpe:/a:intel:proset\/wireless_wifi").as_uri_2_3()
'cpe:/a:intel:proset%2fwireless_wifi'
According to https://nvd.nist.gov/products/cpe/search, the following CPE is a valid CPE:
cpe:/a:intel:proset\/wireless_wifi
However, the current
_VALUE_PATTERN
in cpecomp2_2.py does not recognize it as valid:With the changes in this PR, this CPE becomes recognized as valid: