Skip to content

Commit

Permalink
mysql version pattern bug (#1060)
Browse files Browse the repository at this point in the history
* improve mysql version pattern recognition

* remove version bug

* Change version pattern

* re-run black tests
  • Loading branch information
imsahil007 committed Feb 3, 2021
1 parent 9c22a70 commit 3e80f1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cve_bin_tool/checkers/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ class MysqlChecker(Checker):
r"mysql-bench",
r"dovecot-mysql",
]
VERSION_PATTERNS = [r"mysql\-([0-9]+\.[0-9]+\-[0-9]+\.[0-9]+\.[0-9]+)"]
VERSION_PATTERNS = [r"mysql\-[0-9]+\.[0-9]+\-([0-9]+\.[0-9]+\.[0-9]+)"]
VENDOR_PRODUCT = [("oracle", "mysql"), ("mysql", "mysql")]
4 changes: 2 additions & 2 deletions test/test_data/mysql.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mapping_test_data = [
{
"product": "mysql",
"version": "8.0.8.0.20",
"version": "8.0.20",
"version_strings": [
r"mysql-8.0-8.0.20",
r"To buy MySQL Enterprise support, training, or other products, visit:",
Expand All @@ -13,6 +13,6 @@
"url": "http://ports.ubuntu.com/pool/main/m/mysql-8.0/",
"package_name": "mysql-client-core-8.0_8.0.19-0ubuntu5_arm64.deb",
"product": "mysql",
"version": "8.0.8.0.19",
"version": "8.0.19",
}
]

0 comments on commit 3e80f1d

Please sign in to comment.