Skip to content

Commit af9c4bc

Browse files
authored
fixes #49
cna-assignment-info-to-json.pl is splitting the url field using commas (so commas within a CSV file's field), which is inherently adventurous https://github.com/CVEProject/automation-working-group/blob/master/tools/cna-assignment-info-to-json.pl#L104, but more importantly, commas are valid URL characters https://tools.ietf.org/html/rfc3986#section-2, so the perl script could produce json files where one URL is incorrectly split into 2 ore more URLs. Suggest whitespace as the internal field separator since it's one of the few illegal characters. I can confirm that this change fixes the problem, but I realize many other people may not be expecting this change so it may require some coordination.
1 parent 2e7c576 commit af9c4bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/cna-assignment-info-to-json.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
$product = $fields[1];
102102
$version = $fields[2];
103103
$problem_type = $fields[3];
104-
push(@urls, split(/\s*,\s*/, $fields[4]));
104+
push(@urls, split(/\s+/, $fields[4]));
105105
$description = $fields[5];
106106
}
107107
else

0 commit comments

Comments
 (0)