mirror of https://github.com/MISP/MISP
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 droppedpull/3149/head
parent
f270a4118a
commit
1cfa3385c6
|
@ -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':
|
||||
|
|
Loading…
Reference in New Issue