Provide CSRF token in Dummy login form
This commit is contained in:
parent
09087c934e
commit
fd870c95f9
@ -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">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user