Closed bac closed 5 years ago
At this line in parse_vector a dictionary lookup on 'S' is made. S is a mandatory metric but that check is not made until after parse_vector.
parse_vector
As a result, initializing a CVSS3 with an invalid vector missing 'S' raises a KeyError instead of the expected CVSS3MandatoryError.
CVSS3MandatoryError
https://github.com/skontar/cvss/blob/master/cvss/cvss3.py#L147
Hi! Thanks for reporting the issue. I have created a fix for it, would you mind reviewing it? Thanks!
Fixed.
At this line in
parse_vector
a dictionary lookup on 'S' is made. S is a mandatory metric but that check is not made until afterparse_vector
.As a result, initializing a CVSS3 with an invalid vector missing 'S' raises a KeyError instead of the expected
CVSS3MandatoryError
.https://github.com/skontar/cvss/blob/master/cvss/cvss3.py#L147