runFormPostNoNonce
This commit is contained in:
parent
0fc2cccfef
commit
51943f9a11
@ -25,6 +25,7 @@ module Yesod.Form
|
|||||||
, runFormGet
|
, runFormGet
|
||||||
, runFormMonadGet
|
, runFormMonadGet
|
||||||
, runFormPost
|
, runFormPost
|
||||||
|
, runFormPostNoNonce
|
||||||
, runFormMonadPost
|
, runFormMonadPost
|
||||||
, runFormGet'
|
, runFormGet'
|
||||||
, runFormPost'
|
, runFormPost'
|
||||||
@ -93,6 +94,13 @@ fieldsToDivs = mapFormXml $ mapM_ go
|
|||||||
|]
|
|]
|
||||||
clazz fi = if fiRequired fi then "required" else "optional"
|
clazz fi = if fiRequired fi then "required" else "optional"
|
||||||
|
|
||||||
|
-- | Run a form against POST parameters, without CSRF protection.
|
||||||
|
runFormPostNoNonce :: GForm s m xml a -> GHandler s m (FormResult a, xml, Enctype)
|
||||||
|
runFormPostNoNonce f = do
|
||||||
|
rr <- getRequest
|
||||||
|
(pp, files) <- liftIO $ reqRequestBody rr
|
||||||
|
runFormGeneric pp files f
|
||||||
|
|
||||||
-- | Run a form against POST parameters.
|
-- | Run a form against POST parameters.
|
||||||
--
|
--
|
||||||
-- This function includes CSRF protection by checking a nonce value. You must
|
-- This function includes CSRF protection by checking a nonce value. You must
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user