You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i was testing my application i noticed when you send a scientific notation number in the json and convert it to a Long the calculation takes very long and uses all the CPU.
example:
case class ScientificNotation(number: Long)
implicit val testJsonFormat: RootJsonFormat[ScientificNotation] = jsonFormat1(ScientificNotation)
"it should break" when {
"a scientific number is parsed as long" in {
val json = s"""{ "number": 1e100000000 }"""
json.parseJson.convertTo[ScientificNotation]
}
}
This will a big calculation and will use up all CPU. When used in an API this could potentially DDos the application really easy.
Regards,
Legopiraat
The text was updated successfully, but these errors were encountered:
Hello,
When i was testing my application i noticed when you send a scientific notation number in the json and convert it to a Long the calculation takes very long and uses all the CPU.
example:
This will a big calculation and will use up all CPU. When used in an API this could potentially DDos the application really easy.
Regards,
Legopiraat
The text was updated successfully, but these errors were encountered: