yesod/yesod-core
Evan Rutledge Borden b50ca99566 Deprecate insecure JSON body functions
`parseJsonBody` and `requireJsonBody` do not require a mime type when
parsing `JSON` content. This leaves them open to CSRF. They are now
deprecated and `insecure` versions are added in their place. Consumers
are now given a proper choice between secure and insecure functions.

There is a potential attack vector in that the browser does not trigger
CORS requests for "simple requests", which includes POST requests that
are form or text content-types. An attacker can craft a form whose body
is valid JSON, and when a user visits attacker.com and submits that
form, it can be submitted to bank.com and bypass CORS.

Checking the content-type is application/json prevents this, because if
the content-type was set to application/json, then the browser would
send a CORS request—a preflight OPTIONS request to the server asking if
the current domain (and some other values) are whitelisted to send
requests to that server. If the server doesn't say attacker.com is
whitelisted, the browser will not send the real request to the server.
2019-01-24 09:12:48 -06:00
..
attic Added pong.hs 2013-03-17 12:48:11 +02:00
bench Cleanup warnings 2018-01-15 15:09:07 +02:00
static Add 'yesod-core/' from commit '982d6185bee75b078bee92bd8a2e8743707f1922' 2011-07-22 08:59:56 +03:00
test Deprecate insecure JSON body functions 2019-01-24 09:12:48 -06:00
Yesod Deprecate insecure JSON body functions 2019-01-24 09:12:48 -06:00
.gitignore Add 'yesod-core/' from commit '982d6185bee75b078bee92bd8a2e8743707f1922' 2011-07-22 08:59:56 +03:00
bench.sh Remove a painful slowdown from randomIV 2011-11-25 15:11:15 +02:00
ChangeLog.md Fix test suite compilation on GHC 8.6.3 commercialhaskell/stackage#4319 2019-01-22 18:40:31 +02:00
helloworld.hs MonadHandler/MonadWidget 2013-03-17 10:10:39 +02:00
LICENSE Update license with MIT license 2012-04-29 09:38:45 +03:00
README.md README.md 2014-11-23 12:18:41 +02:00
Setup.lhs Add 'yesod-core/' from commit '982d6185bee75b078bee92bd8a2e8743707f1922' 2011-07-22 08:59:56 +03:00
yesod-core.cabal Fix test suite compilation on GHC 8.6.3 commercialhaskell/stackage#4319 2019-01-22 18:40:31 +02:00

yesod-core

This is the main package for Yesod, providing all core functionality on which other packages can be built. It provides dispatch, handler functions, widgets, etc.

Yesod is well documented on its website.