Skip to content

Commit bcafab0

Browse files
authored
fix: improve proftpd checker (#2990)
Improve proftpd checker to avoid a false positive with lynx which has a check for broken ProFTPD 1.2.5rc1 and so embeds the following string: ProFTPD 1.2.5 Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 6cfdc43 commit bcafab0

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

cve_bin_tool/checkers/proftpd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
class ProftpdChecker(Checker):
1818
CONTAINS_PATTERNS: list[str] = []
1919
FILENAME_PATTERNS: list[str] = []
20-
VERSION_PATTERNS = [r"ProFTPD ([0-9]+\.[0-9]+\.[0-9a-z]+)"]
20+
VERSION_PATTERNS = [r"ProFTPD ([0-9]+\.[0-9]+\.[0-9a-z]+) "]
2121
VENDOR_PRODUCT = [("proftpd_project", "proftpd"), ("proftpd", "proftpd")]

test/test_data/lynx.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,23 @@
1919
"package_name": "lynx-2.9.0-dev.10.2.fc37.1.aarch64.rpm",
2020
"product": "lynx",
2121
"version": "2.9.0dev.10",
22-
"other_products": ["proftpd"],
2322
},
2423
{
2524
"url": "http://rpmfind.net/linux/fedora-secondary/development/rawhide/Everything/ppc64le/os/Packages/l/",
2625
"package_name": "lynx-2.9.0-dev.10.2.fc37.1.ppc64le.rpm",
2726
"product": "lynx",
2827
"version": "2.9.0dev.10",
29-
"other_products": ["proftpd"],
3028
},
3129
{
3230
"url": "http://ftp.fr.debian.org/debian/pool/main/l/lynx/",
3331
"package_name": "lynx_2.8.9dev11-1_arm64.deb",
3432
"product": "lynx",
3533
"version": "2.8.9dev.11",
36-
"other_products": ["proftpd"],
3734
},
3835
{
3936
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
4037
"package_name": "lynx_2.8.9rel.1-1_x86_64.ipk",
4138
"product": "lynx",
4239
"version": "2.8.9rel.1",
43-
"other_products": ["proftpd"],
4440
},
4541
]

test/test_data/proftpd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"product": "proftpd",
77
"version": "1.3.8rc4",
8-
"version_strings": ["ProFTPD 1.3.8rc4"],
8+
"version_strings": ["ProFTPD 1.3.8rc4 "],
99
}
1010
]
1111
package_test_data = [

0 commit comments

Comments
 (0)