Closes #1159 Based on reading this [StackOverflow Post](http://stackoverflow.com/questions/6412813/do-login-forms-need-tokens-against-csrf-attacks) and skimming [this paper](http://seclab.stanford.edu/websec/csrf/csrf.pdf), using CSRF protection on login forms protects against a vulnerability where an attacker submits their own username/password in the login form. Later, the user uses the real site, but doesn't realize they're logged in as the attacker. This creates vulnerabilities like: 1. If the site logs the user's activity for them (e.g. recently watched videos on YouTube, previous searches on Google), the attacker can see this information by logging in. 2. The user adds sensitive information to the account, like credit card information, the attacker can login and potentially steal that information or use it on the site. I don't think this vulnerability applies to the `Yesod.Auth.Hardcoded` plugin because the attacker couldn't create an account of their own. However: * If I understand the example in `Yesod.Auth.Hardcoded`, one use case is to share one login form that works for both the Hardcoded plugin as well as normal database-backed username/password login, in which case having a CSRF token makes sense * I don't see a downside to having the CSRF token there * It makes the Hardcoded plugin work with the CSRF middleware Does this sound like the right solution? |
||
|---|---|---|
| demo | ||
| yesod | ||
| yesod-auth | ||
| yesod-auth-oauth | ||
| yesod-bin | ||
| yesod-core | ||
| yesod-eventsource | ||
| yesod-form | ||
| yesod-newsfeed | ||
| yesod-persistent | ||
| yesod-sitemap | ||
| yesod-static | ||
| yesod-test | ||
| yesod-websockets | ||
| .gitignore | ||
| .travis.yml | ||
| CODE_OF_CONDUCT.md | ||
| Dockerfile | ||
| LICENSE | ||
| README | ||
| README.md | ||
| ReleaseNotes.md | ||
| sources.txt | ||
| stack.yaml | ||
Yesod Web Framework
An advanced web framework using the Haskell programming language. Featuring:
- safety & security guaranteed at compile time
- developer productivity: tools for all your basic web development needs
- raw performance
- fast, compiled code
- techniques for constant-space memory consumption
- asynchronous IO
- this is built in to the Haskell programming language (like Erlang)
Learn more about Yesod on its main website. If you want to get started using Yesod, we strongly recommend the quick start guide, based on the Haskell build tool stack.
Hacking on Yesod
Yesod consists mostly of four repositories:
git clone --recursive http://github.com/yesodweb/shakespeare
git clone --recursive http://github.com/yesodweb/persistent
git clone --recursive http://github.com/yesodweb/wai
git clone --recursive http://github.com/yesodweb/yesod
Each repository can be built with stack build.