Skip to content

CPE22 - Invalid language '-' #39

@thegrymek

Description

@thegrymek

Hi,

After download nvd cpe in 2.2 version I found out there a bug.

>>> import cpe
>>> cpe.CPE('cpe:/a:ibm:powervc:1.2.1.1:-:~-~standard~~~:-', cpe.CPE.VERSION_2_2)
    Traceback (most recent call last):
    ...
    File ".../cpe/comp/cpecomp_simple.py", line 250, in _parse
       raise ValueError(errmsg)
ValueError: Invalid value of attribute 'language': -

This CPE is downloaded from nvd cpe
Official scheme says that - is allowed in language part.

[c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9\._\-~%]*){0,6}

https://cpe.mitre.org/specification/2.2/cpe-dictionary_2.2.xsd

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions