CPE-Parser
CPE-Parser copied to clipboard
Convert.wellFormedToFS issue
When a field in a CPE contains a trailing . character, parsing the CPE and converting it back to string generates a result different from the original cpe string. For example
String cpe = "cpe:2.3:a:bookly_project:bookly:3.4.:*:*:*:*:wordpress:*:*";
Cpe parsedCpe = CpeParser.parse(cpe);
System.out.println(parsedCpe.toCpe23FS());
Outputs
cpe:2.3:a:bookly_project:bookly:3.4\.:*:*:*:*:wordpress:*:*
Probably an edge case but there are still CPEs with this format in NVD (although probably deprecated).