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; break;
case 'vulnerability': 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,6}$#", $value)) {
$returnValue = true; $returnValue = true;
} else { } else {
@ -1025,10 +1026,10 @@ class Attribute extends AppModel {
case 'pattern-in-file': case 'pattern-in-file':
case 'pattern-in-traffic': case 'pattern-in-traffic':
case 'pattern-in-memory': case 'pattern-in-memory':
case 'yara': case 'yara':
case 'stix2-pattern': case 'stix2-pattern':
case 'sigma': case 'sigma':
case 'gene': case 'gene':
case 'cookie': case 'cookie':
case 'attachment': case 'attachment':
case 'malware-sample': case 'malware-sample':
@ -1071,8 +1072,8 @@ class Attribute extends AppModel {
case 'filename': case 'filename':
case 'pdb': case 'pdb':
case 'windows-scheduled-task': case 'windows-scheduled-task':
case 'whois-registrant-name': case 'whois-registrant-name':
case 'whois-registrant-org': case 'whois-registrant-org':
case 'whois-registrar': case 'whois-registrar':
case 'whois-creation-date': case 'whois-creation-date':
case 'first-name': case 'first-name':