authentication: use hidden form instead of referer

This also gives us some CSRF protection. Note that we make use of the
hmac to protect the redirect value.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2014-01-16 11:39:17 +01:00
والد d6e9200cc3
کامیت b826537cb4
3فایلهای تغییر یافته به همراه133 افزوده شده و 96 حذف شده

مشاهده پرونده

@ -662,7 +662,8 @@ auth filter::
the http cookie and return a 0 if it is invalid or 1 if it is invalid,
in the exit code / close function. If the filter action is
"authenticate-post", this filter receives POST'd parameters on
standard input, and should write to output one or more "Set-Cookie"
standard input, and should write a complete CGI request, preferably
with a 302 redirect, and write to output one or more "Set-Cookie"
HTTP headers, each followed by a newline.
Please see `filters/simple-authentication.lua` for a clear example