Commit Graph

4024 Commits

Author SHA1 Message Date
Murray
a15070709d allow more than one session message and add statuses 2016-03-16 18:14:40 +00:00
Michael Snoyman
e7c6d06d3d Newer LTS release 2016-03-13 08:26:31 +02:00
Michael Snoyman
406694cd29 Version bump for #1182 2016-03-13 08:26:24 +02:00
Michael Snoyman
292270f36a Merge pull request #1182 from mrkkrp/master
Allow lines of dashes in route files
2016-03-13 08:24:57 +02: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
mrkkrp
3640d75c99 Allow lines of dashes in route files
See #1180.
2016-03-11 14:09:57 +06: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
Sibi
1bc843c0ce Merge pull request #1175 from sajith/patch-1
Minor doc patch - sendStatusJSON is since 1.4.18
2016-03-07 06:00:40 +05:30
Sajith Sasidharan
93da4f060e Minor doc patch - sendStatusJSON is since 1.4.18
I'm sure this is trivially obvious. :-)

Commit 6a60dac introduced `sendStatusJSON` on Nov 25, 2015; yesod-core 1.4.18 was uploaded to hackage on Dec 17.
2016-03-06 18:22:51 -05:00
Michael Snoyman
d922bdd272 Merge pull request #1158 from geraldus/gman/summernote
Add Summernote WYSIWYG html field
2016-03-06 11:53:52 +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
Arthur Fayzrakhmanov (Артур Файзрахманов)
a38564df43 Fix line ending 2016-03-04 22:07:18 +05:00
Arthur Fayzrakhmanov (Артур Файзрахманов)
fe2b6844b6 Add notice about Summernote 2016-03-04 22:07:06 +05: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
Michael Snoyman
64cb8980db Version bump 2016-03-02 11:08:15 +02:00
Michael Snoyman
169b3a6b44 Merge branch 'fix/oauth-twitter-id' of https://github.com/kakkun61/yesod 2016-03-02 11:05:25 +02:00
Michael Snoyman
5709040dcd Add some docs for MassInput 2016-03-02 11:05:19 +02:00
Kazuki Okamoto
e1b70eb0f8 new twitter plugin 2016-03-02 10:59:43 +09:00
Sibi
3d8c91bae6 Merge pull request #1169 from bitemyapp/master
Trivial typo in haddocks bothering me
2016-03-02 03:58:20 +05:30
Chris Allen
7123b02500 typo 2016-03-01 15:13:34 -06:00
Kazuki Okamoto
8a66da1f24 Revert "add twitterId function"
This reverts commit 074b0c68e7.
2016-03-01 23:21:17 +09:00
Kazuki Okamoto
074b0c68e7 add twitterId function 2016-02-29 04:07:42 +09:00
Kazuki Okamoto
d46d754555 Revert "change Twitter ID screen_name → user_id"
This reverts commit 5a25e5e53b.
2016-02-29 00:00:42 +09:00
Kazuki Okamoto
5a25e5e53b change Twitter ID screen_name → user_id 2016-02-28 16:48:56 +09:00
Maximilian Tagher
aae32399f1 Merge pull request #1165 from lethjakman/auth_csrf
Fixed registerHandler CSRF issue
2016-02-23 14:54:50 +01:00
Maximilian Tagher
9dd48ab4b3 Merge pull request #1161 from MaxGabriel/yesodAuthHardodedUseCSRFToken
Have the yesod-auth login form use a CSRF token
2016-02-23 14:54:38 +01:00
Michael Snoyman
b09d029fb7 Merge pull request #1166 from luigy/master
[WIP] improve stack detection for yesod-bin
2016-02-21 15:51:43 +02: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
Luigy Leon
f576a8a435 only perform checks when it needs to build 2016-02-19 15:42:42 -05:00
Luigy Leon
d87499deb5 [yesod-bin] improve stack detection for 'stack keter'
The following will now use stack:

* `stack query` succeeds from current directory instead of searching that a `stack.yaml` exists
* `STACK_YAML` or `STACK_EXE`(set by `stack exec`) environment variables are set
2016-02-19 12:21:02 -05: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
Michael Snoyman
d8414c3c20 Merge pull request #1155 from chreekat/enclosure-doc
Document feed entry enclosures
2016-02-03 09:27:41 +02:00
Bryan Richter
806dc5c629
Fuller docs + version bump 2016-02-02 08:59:01 -08:00