Merge branch '2.4' of https://github.com/MISP/MISP into develop

pull/8292/head
chrisr3d 2022-04-20 19:37:59 +02:00
commit 6bb57ca7b5
3 changed files with 7 additions and 5 deletions

View File

@ -833,7 +833,6 @@ class User extends AppModel
$gpg = $this->initializeGpg();
$sendEmail = new SendEmail($gpg);
$result = $sendEmail->sendToUser($user, $subject, $body, $bodyNoEnc,$replyToUser ?: []);
try {
$result = $sendEmail->sendToUser($user, $subject, $body, $bodyNoEnc,$replyToUser ?: []);

View File

@ -1133,7 +1133,9 @@ class StixFromMISPParser(StixParser):
@staticmethod
def get_misp_type(labels):
return labels[0].split('=')[1].strip('"')
for label in labels:
if label.startswith('misp:type=') or label.startswith('misp:name='):
return label.split('=')[1].strip('"')
@staticmethod
def parse_attribute_pattern(pattern):
@ -1164,8 +1166,8 @@ class StixFromMISPParser(StixParser):
@staticmethod
def parse_custom_property(custom_property):
properties = custom_property.split('_')
return {'type': properties[2], 'object_relation': '-'.join(properties[3:])}
properties = custom_property.split('_')[2:]
return {'object_relation': '-'.join(properties)}
class ExternalStixParser(StixParser):

View File

@ -25,7 +25,8 @@ attributes_mapping = {
'email-reply-to': '_parse_email_reply_to',
'attachment': '_parse_attachment',
'mac-address': '_parse_value',
'AS': '_parse_number'
'AS': '_parse_number',
'link': '_parse_value'
}
attributes_type_mapping = {