Skip to content

Commit

Permalink
#1517 Don't split multiline observable
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Sep 8, 2020
1 parent c4c7d43 commit a920773
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dto/src/main/scala/org/thp/thehive/dto/v0/Observable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ object InputObservable {
implicit val writes: Writes[InputObservable] = Json.writes[InputObservable]

val fp: FieldsParser[Seq[String]] = FieldsParser[Seq[String]]("data") {
case (_, FString(s)) => Good(s.split("\\R+").toSeq)
case (_, FString(s)) => Good(Seq(s))
case (_, FAny(s)) => Good(s)
case (_, FSeq(a)) => a.validatedBy(FieldsParser.string(_))
case (_, FUndefined) => Good(Nil)
Expand Down
2 changes: 1 addition & 1 deletion dto/src/main/scala/org/thp/thehive/dto/v1/Observable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ object InputObservable {
implicit val writes: Writes[InputObservable] = Json.writes[InputObservable]

val fp: FieldsParser[Seq[String]] = FieldsParser[Seq[String]]("data") {
case (_, FString(s)) => Good(s.split("\\R+").toSeq)
case (_, FString(s)) => Good(Seq(s))
case (_, FAny(s)) => Good(s)
case (_, FSeq(a)) => a.validatedBy(FieldsParser.string(_))
case (_, FUndefined) => Good(Nil)
Expand Down

0 comments on commit a920773

Please sign in to comment.