Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version generator fails for version with 4 parts, e.g. 2.0.11.2 #4

Open
jasinner opened this issue Oct 14, 2015 · 2 comments
Open

Version generator fails for version with 4 parts, e.g. 2.0.11.2 #4

jasinner opened this issue Oct 14, 2015 · 2 comments
Assignees

Comments

@jasinner
Copy link
Member

Try: "python -m unittest test_vulnerability"

It should fail with:

ERROR: test_print_flaw (test_vulnerability.TestVulnerability)

Traceback (most recent call last):
File "test_vulnerability.py", line 8, in test_print_flaw
vul = vulnerability.Vulnerability('test/6504.yaml')
File "vulnerability.py", line 59, in init
self.add_libraries(data['affected'])
File "vulnerability.py", line 71, in add_libraries
version, groupId, artifactId))
File "library.py", line 92, in init
self.confirmVersions()
File "library.py", line 115, in confirmVersions
firstY = float(valList[0])
ValueError: invalid literal for float(): 2.0.11

@jasinner
Copy link
Member Author

Skipped the library for now, but need to come back and address this.

@jasinner
Copy link
Member Author

4 digit version numbers are not maven standard version. For 4 digits, Maven does a string comparison:

For example, Maven arranges the version list in the following manner:
1.0.1.0
1.0.10.1
1.0.10.2
1.0.9.3
Version 1.0.9.3 should come before 1.0.10.1 and 1.0.10.2, but the unexpected fourth field (.3) forced Maven to evaluate the version as a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants