diff options
author | Loïc Hoguin <[email protected]> | 2016-08-29 12:39:49 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-08-29 12:40:03 +0200 |
commit | c807880f7ac73f813b2660ea81a00f7712a4e793 (patch) | |
tree | ba1d09e9b177f230665a80513b33fbd532000ce4 /archives/extend/attachments/20130415/03f35a62/attachment.html | |
parent | b1df25a7d9cda697513650659b781b55b40898f8 (diff) | |
download | ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.gz ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.bz2 ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.zip |
Add old mailing list archives
Diffstat (limited to 'archives/extend/attachments/20130415/03f35a62/attachment.html')
-rw-r--r-- | archives/extend/attachments/20130415/03f35a62/attachment.html | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/archives/extend/attachments/20130415/03f35a62/attachment.html b/archives/extend/attachments/20130415/03f35a62/attachment.html new file mode 100644 index 00000000..e39c9a22 --- /dev/null +++ b/archives/extend/attachments/20130415/03f35a62/attachment.html @@ -0,0 +1,8 @@ +<tt> +<div dir="ltr">Hello group,<div><br></div><div style>I am trying to put together a CSRF middleware�<a href="https://github.com/rambocoder/stable/commit/b26980d292ac42aadfe9921a961436e28cdbb693">https://github.com/rambocoder/stable/commit/b26980d292ac42aadfe9921a961436e28cdbb693</a>�and if the body of the request contains "_csrf" token, I check to make sure it matches the csrf token in the session.</div><br> +<div style><br></div><div style>Currently I am doing it in middleware using cowboy_req:body_qs/1 however when in the handler I need to read another body parameter, such as in the rest_pastebin example:</div><div style><br><br> +</div><div style><div><span class="" style="white-space:pre"> </span>{ok, BodyQs, Req3} = cowboy_req:body_qs(Req),</div><div><span class="" style="white-space:pre"> </span>Paste = proplists:get_value(<<"paste">>, BodyQs),<br><br> +</div><div><br></div><div>cowboy_req:body_qs/1 returns [] due to the body of the request being already read�{body_state,done}<br></div><div><br></div><div style>Is it pointless to have the type of CSRF middleware that I am writing and just do the CSRF in the handler's callback, where I can deal with all the body_qs at once?</div><br> +<div style><br></div><div style>Thank you,</div><div style><br></div><div style>rambocoder</div></div></div><br> + +</tt> |