Merge pull request #1205 from league/master
Provide CSRF token in Dummy login form
This commit is contained in:
commit
93039dfc7c
@ -1,3 +1,7 @@
|
|||||||
|
## 1.4.13.1
|
||||||
|
|
||||||
|
* Add CSRF token to login form from `Yesod.Auth.Dummy` [#1205](https://github.com/yesodweb/yesod/pull/1205)
|
||||||
|
|
||||||
## 1.4.13
|
## 1.4.13
|
||||||
|
|
||||||
* Add a CSRF token to the login form from `Yesod.Auth.Hardcoded`, making it compatible with the CSRF middleware [#1161](https://github.com/yesodweb/yesod/pull/1161)
|
* Add a CSRF token to the login form from `Yesod.Auth.Hardcoded`, making it compatible with the CSRF middleware [#1161](https://github.com/yesodweb/yesod/pull/1161)
|
||||||
|
|||||||
@ -20,10 +20,13 @@ authDummy =
|
|||||||
lift $ setCredsRedirect $ Creds "dummy" ident []
|
lift $ setCredsRedirect $ Creds "dummy" ident []
|
||||||
dispatch _ _ = notFound
|
dispatch _ _ = notFound
|
||||||
url = PluginR "dummy" []
|
url = PluginR "dummy" []
|
||||||
login authToMaster =
|
login authToMaster = do
|
||||||
|
request <- getRequest
|
||||||
toWidget [hamlet|
|
toWidget [hamlet|
|
||||||
$newline never
|
$newline never
|
||||||
<form method="post" action="@{authToMaster url}">
|
<form method="post" action="@{authToMaster url}">
|
||||||
|
$maybe t <- reqToken request
|
||||||
|
<input type=hidden name=#{defaultCsrfParamName} value=#{t}>
|
||||||
Your new identifier is: #
|
Your new identifier is: #
|
||||||
<input type="text" name="ident">
|
<input type="text" name="ident">
|
||||||
<input type="submit" value="Dummy Login">
|
<input type="submit" value="Dummy Login">
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-auth
|
name: yesod-auth
|
||||||
version: 1.4.13
|
version: 1.4.13.1
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman, Patrick Brisbin
|
author: Michael Snoyman, Patrick Brisbin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user