Skip to content

Commit c252407

Browse files
authored
fix: update dovecot checker (#4419)
Update dovecot pattern to catch version with 4 digits Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 17a6d41 commit c252407

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

cve_bin_tool/checkers/dovecot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class DovecotChecker(Checker):
2424
]
2525
FILENAME_PATTERNS = [r"dovecot"]
2626
VERSION_PATTERNS = [
27-
r"Dovecot v([0-9]+\.[0-9]+\.[0-9]+)",
28-
r"DOVECOT_VERSION=([0-9]+\.[0-9]+\.[0-9]+)",
27+
r"Dovecot v([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?)",
28+
r"DOVECOT_VERSION=([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?)",
2929
]
3030
VENDOR_PRODUCT = [("dovecot", "dovecot")]
Binary file not shown.

test/test_data/dovecot.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"version": "2.2.11",
88
"version_strings": ["Dovecot v2.2.11", "DOVECOT_VERSION=2.2.11"],
99
},
10+
{
11+
"product": "dovecot",
12+
"version": "2.3.21.1",
13+
"version_strings": ["Dovecot v2.3.21.1", "DOVECOT_VERSION=2.3.21.1"],
14+
},
1015
]
1116
package_test_data = [
1217
{
@@ -33,4 +38,10 @@
3338
"product": "dovecot",
3439
"version": "2.3.13",
3540
},
41+
{
42+
"url": "http://ftp.fr.debian.org/debian/pool/main/d/dovecot/",
43+
"package_name": "dovecot-core_2.3.21.1%2Bdfsg1-1_arm64.deb",
44+
"product": "dovecot",
45+
"version": "2.3.21.1",
46+
},
3647
]

0 commit comments

Comments
 (0)