Commit Graph

378 Commits

Author SHA1 Message Date
Adam Sjøgren
04a7c12b65 Add translation to Danish. 2016-03-20 21:16:14 +01:00
Murray
a15070709d allow more than one session message and add statuses 2016-03-16 18:14:40 +00:00
Michael Snoyman
27a9faa91f Merge pull request #1183 from lethjakman/auth_forgot_password_csrf
Fixed forgot password CSRF with form helper
2016-03-13 08:11:16 +02:00
Alex Kardos
d76aa1a16e Converted runFormPosts to generateFormPost
This is a cleaner way to generate forms without ignoring one of the
variables.
2016-03-12 18:29:05 -07:00
Alex Kardos
9fb3f61ac8 Moved settings to functions to clean up the form 2016-03-12 18:29:05 -07:00
Alex Kardos
2f0a7fbcc5 Wrapped email login form with an id 2016-03-12 18:29:05 -07:00
Alex Kardos
0c0cb12a10 Used form helper for forgot password form
* Removed unused idents
* Isolated form logic
* Added an id around forgot password for styling purposes
2016-03-12 18:28:49 -07:00
Michael Snoyman
8df56ecaa1 Merge pull request #1176 from lethjakman/auth_set_password_csrf
Auth password handler CSRF
2016-03-10 10:55:17 +02:00
Alex Kardos
dee130ac9f Made spacing consistent with the rest of the file 2016-03-09 19:47:52 -07:00
Alex Kardos
7faecc8952 Added translations and dummy data for current password
German and Spanish provided by Erin Eichenberger.
2016-03-09 19:22:36 -07:00
Michael Snoyman
936fe84cdd Deprecate BrowserId #1173 2016-03-08 16:27:21 +02:00
Alex Kardos
e3aa310c84 Used monadic form helper for password handler
This needed to happen in order to automatically get CSRF protection

Several changes happened while switching over:
* Relied on built in names for inputs
* Cleaned up naming
* Created password helpers for each field
* Added a translation for current password
2016-03-07 16:44:05 -07:00
Michael Snoyman
4ed1e7e486 Merge pull request #1174 from lethjakman/auth_main_page_csrf
Fixed CSRF token for login page
2016-03-07 10:03:30 +02:00
Alex Kardos
4b78c4d60a Moved emailLoginHandler out of authEmail
The authEmail function was getting large so I moved the
emailLoginHandler out into its own function.
2016-03-05 16:59:02 -07:00
Alex Kardos
d42d38990d Added translated label to default register handler
This was removed on accident.
2016-03-05 16:58:34 -07:00
Alex Kardos
4963f562fe Converted yesod login screen to monadic form
The form helpers weren't being used which caused the CSRF tokens to not
be present. This also allows for a bit more flexability and
cleans up the code as well.
2016-03-03 20:52:08 -07:00
Maximilian Tagher
aae32399f1 Merge pull request #1165 from lethjakman/auth_csrf
Fixed registerHandler CSRF issue
2016-02-23 14:54:50 +01:00
Alex Kardos
1cae0e38ab Moved login logic into a function
This is more clear and looks like the other authorization plugins.
2016-02-20 21:28:20 -07:00
Alex Kardos
456e93fb10 Added autofocus attribute to email input 2016-02-20 13:47:42 -07:00
Alex Kardos
27e1ec3be3 Used email field for input 2016-02-20 13:39:18 -07:00
Alex Kardos
c376146231 Removed whitespace 2016-02-20 13:38:48 -07:00
Alex Kardos
ed5037fa74 Used localized email label 2016-02-20 13:38:19 -07:00
Alex Kardos
3e37983f1c Added encoding type and removed unused variable 2016-02-20 13:37:43 -07:00
Alex Kardos
76fc5887f9 Fixed registerHandler CSRF issue
The default register handler for email authentication didn't provide a
CSRF token. I provided one by using a monadic form helper.
2016-02-17 20:39:09 -07:00
Maximilian Tagher
d39ce44c21 Use defaultCsrfParamName instead of hard-coding its value
* Up version bounds so that `defaultCsrfParamName` is available.
* I didn't bump the yesod-form version. It seemed unnecessary to do a new release just for this.
2016-02-15 23:59:24 -08:00
Maximilian Tagher
a01051eaf6 Have the yesod-auth login form use a CSRF token
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?
2016-02-14 17:32:46 -08:00
Eugen
69b4751990 Fix typo in auth german translation 2016-01-26 00:12:26 +01:00
Michael Snoyman
df90bd43e2 Deprecate Yesod.Auth.GoogleEmail #1150 2016-01-21 09:00:50 +02:00
vlatkoB
1fca3ceea3 Croatian translation 2016-01-20 08:48:15 +01:00
mrkkrp
1976e90be9 Bump password strength to compensate 2 years
Computers are now faster than in 2013.
2015-12-03 00:08:51 +06:00
mrkkrp
2431100c8b Fix a typo 2015-12-03 00:08:40 +06:00
Greg Weber
dae434aa64 release Yesod.Auth.HardCoded 2015-11-29 17:27:41 -08:00
Arthur Fayzrakhmanov (Артур Файзрахманов)
4f2f49b5ee Update documention
More concrete module documentation.  Now it shows a way to combine
'AuthHardcoded' plugin with other plugins.

Fixed some typos.
2015-11-29 22:12:40 +05:00
Arthur Fayzrakhmanov (Артур Файзрахманов)
f524ce55ea Bump minor version of yesod-auth 2015-11-29 22:12:40 +05:00
Arthur Fayzrakhmanov (Артур Файзрахманов)
b024a7a540 Add module documentation 2015-11-29 22:12:40 +05:00
Arthur Fayzrakhmanov (Артур Файзрахманов)
9fbc3bc082 Initial module implementation 2015-11-29 22:12:40 +05:00
Arthur Fayzrakhmanov (Артур Файзрахманов)
ec3ec15a80 Fix Czech UserName message
Convert word "jméno" to lowercase.
See comment from
[`lubomir`](https://github.com/yesodweb/yesod/pull/1100#commitcomment-14580304)
2015-11-24 13:34:13 +05:00
Arthur Fayzrakhmanov (Артур Файзрахманов)
a6494bf788 Bump minor version 2015-11-24 02:19:04 +05:00
Arthur Fayzrakhmanov (Артур Файзрахманов)
97d8bbba06 Introduce LogoutTitle message constructor
`LogoutTitle` is a replacement for `Logout` constructor, the latter is
inconsistent with `LoginTitle` constructor name.
Added `DEPRECATED` pragma to warn users about this change.
2015-11-24 02:15:03 +05:00
Arthur Fayzrakhmanov (Артур Файзрахманов)
11bedecdc0 Prettify imports (via Stylish Haskell) 2015-11-23 16:41:09 +05:00
Arthur Fayzrakhmanov (Артур Файзрахманов)
d1e92af79e Add UserName message constructor 2015-11-23 16:40:47 +05:00
Arthur Fayzrakhmanov (Артур Файзрахманов)
311f949f0e Extract "in"/"out" suffixes in Login/Logout words
Split "Login" and "Logout" words into two parts, e.g. "Log In" and "Log
Out".
2015-11-23 16:14:40 +05:00
Paul Rouse
276e687ac5 Example loginHandler override in haddock 2015-10-27 11:50:27 +00:00
Paul Rouse
a25153d86e Provide default loginHandler as separate function 2015-10-21 12:27:59 +01:00
Michael Snoyman
5d0a4567f3 Add the guessApproot function (pinging @gregwebs) 2015-10-13 10:32:25 +00:00
Michael Snoyman
2179a8e30d GoogleEmail2: proper error message when permission denied 2015-10-13 08:02:19 +00:00
Michael Snoyman
e2e2edf270 Fix openid.hs 2015-10-13 07:41:49 +00:00
Greg Weber
3f96cae289 yesod-auth: add a runHttpRequest typeclass method 2015-10-07 07:06:21 -07:00
Greg Weber
92870f8c47 version bump 2015-09-10 16:18:36 -07:00
Greg Weber
6a567f0ccd ask for profile permission
somehow we are able to read the profile
of most users without this
2015-09-10 15:57:01 -07:00