Update Attribute.php

According to https://cve.mitre.org/news/archives/2014/news.html#jan152014_New_CVE_ID_Format_in_Effect_as_of_January_1_2014 the four-fixed-digits requirement has been dropped
pull/3149/head
StefanKelm 2018-04-12 14:35:04 +02:00 committed by GitHub
parent f270a4118a
commit 1cfa3385c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1024,10 +1024,10 @@ class Attribute extends AppModel {
break;
case 'vulnerability':
$value = str_replace('', '-', $value);
if (preg_match("#^(CVE-)[0-9]{4}(-)[0-9]{4,6}$#", $value)) {
if (preg_match("#^(CVE-)[0-9]{4}(-)[0-9]{4,}$#", $value)) {
$returnValue = true;
} else {
$returnValue = 'Invalid format. Expected: CVE-xxxx-xxxx.';
$returnValue = 'Invalid format. Expected: CVE-xxxx-xxxx...';
}
break;
case 'named pipe':