Skip to content

Commit

Permalink
#1819 Prevent MISP sync failure when malware-sample has no attached file
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Mar 9, 2021
1 parent cbe5f3d commit 086c7de
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,11 @@ class MispClient(
.mapAsyncUnordered(2) {
case attribute @ Attribute(id, "malware-sample" | "attachment", _, _, _, _, _, _, _, None, _, _, _, _) =>
// TODO need to unzip malware samples ?
downloadAttachment(id).map {
case (filename, contentType, src) => attribute.copy(data = Some((filename, contentType, src)))
}
downloadAttachment(id)
.map {
case (filename, contentType, src) => attribute.copy(data = Some((filename, contentType, src)))
}
.recover { case _ => attribute }
case attribute => Future.successful(attribute)
}
.mapMaterializedValue(_ => NotUsed)
Expand Down

0 comments on commit 086c7de

Please sign in to comment.