fix: CVE en dash converted to '-'

pull/2909/head
iglocska 2018-02-06 10:59:33 +01:00
parent 71273e1189
commit 1545b4df09
1 changed files with 7 additions and 6 deletions

View File

@ -1000,6 +1000,7 @@ class Attribute extends AppModel {
}
break;
case 'vulnerability':
$value = str_replace('', '-', $value);
if (preg_match("#^(CVE-)[0-9]{4}(-)[0-9]{4,6}$#", $value)) {
$returnValue = true;
} else {
@ -1025,10 +1026,10 @@ class Attribute extends AppModel {
case 'pattern-in-file':
case 'pattern-in-traffic':
case 'pattern-in-memory':
case 'yara':
case 'stix2-pattern':
case 'sigma':
case 'gene':
case 'yara':
case 'stix2-pattern':
case 'sigma':
case 'gene':
case 'cookie':
case 'attachment':
case 'malware-sample':
@ -1071,8 +1072,8 @@ class Attribute extends AppModel {
case 'filename':
case 'pdb':
case 'windows-scheduled-task':
case 'whois-registrant-name':
case 'whois-registrant-org':
case 'whois-registrant-name':
case 'whois-registrant-org':
case 'whois-registrar':
case 'whois-creation-date':
case 'first-name':