runFormPost: proper behavior for missing input #950
This commit is contained in:
parent
376b6f9c0d
commit
f8847bd231
@ -1,3 +1,7 @@
|
||||
## 1.4.4.1
|
||||
|
||||
* runFormPost has wrong behavior for empty forms [#950](https://github.com/yesodweb/yesod/issues/950)
|
||||
|
||||
## 1.4.4
|
||||
|
||||
* Add a `Semigroup` instance
|
||||
|
||||
@ -223,6 +223,7 @@ postHelper form env = do
|
||||
((res, xml), enctype) <- runFormGeneric (form token) m langs env
|
||||
let res' =
|
||||
case (res, env) of
|
||||
(_, Nothing) -> FormMissing
|
||||
(FormSuccess{}, Just (params, _))
|
||||
| not (Map.lookup tokenKey params === reqToken req) ->
|
||||
FormFailure [renderMessage m langs MsgCsrfWarning]
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name: yesod-form
|
||||
version: 1.4.4
|
||||
version: 1.4.4.1
|
||||
license: MIT
|
||||
license-file: LICENSE
|
||||
author: Michael Snoyman <michael@snoyman.com>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user