ekmett/lens — pull request #448 by basvandijk (2014-05-20 09:24:55+00:00)
Title: Protect against the huge-exponent DoS attack

The `Data.Aeson.Lens._Double prism` converted a `Scientific` to a `Double` using `realToFrac` (`fromRational . toRational`). This however is vulnerable to a DoS attack where an attacker can send a scientific number with a huge exponent like 1e1000000000. `toRational` will convert this to the Rational: `(1 * 10^1000000000) % 1`. The Integer 10^1000000000 will then take up all space and crash your program. The `Scientific.toRealFloat` function guards against huge exponents.