diff --git a/thehive/app/org/thp/thehive/controllers/v0/QueryCtrl.scala b/thehive/app/org/thp/thehive/controllers/v0/QueryCtrl.scala index 14e6237461..3577df52f3 100644 --- a/thehive/app/org/thp/thehive/controllers/v0/QueryCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v0/QueryCtrl.scala @@ -44,8 +44,9 @@ trait QueryCtrl { TH3Aggregation.fieldsParser val sortParser: FieldsParser[InputSort] = FieldsParser("sort") { - case (_, FAny(s)) => Good(s) + case (_, FAny(s)) => Good(s.flatMap(_.split(','))) case (_, FSeq(s)) => s.validatedBy(FieldsParser.string.apply) + case (_, FString(s)) => Good(s.split(',').toSeq) case (_, FUndefined) => Good(Nil) }.map("sort") { a => val fields = a.collect {