Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSRF Protection #613

Closed
16 tasks done
chrisdpeters opened this issue Mar 28, 2016 · 13 comments
Closed
16 tasks done

CSRF Protection #613

chrisdpeters opened this issue Mar 28, 2016 · 13 comments
Assignees
Milestone

Comments

@chrisdpeters
Copy link
Contributor

chrisdpeters commented Mar 28, 2016

If all goes well with our CSRF Protection plugin, we may want to implement this for the next major release.

Suggested task list if we decide to go forward with this:

  • Integrate into core
  • Add call to protectFromForgery to default controllers/Controller.cfc file included in framework zip
  • Add call to csrfMetaTags to default views/layout.cfm file included in framework zip
  • Write tests
    • Write tests for including token as X-CSRF-Token HTTP header
  • Write documentation
    • protectFromForgery
    • csrfMetaTags
    • authenticationTokenField
    • Upgrading - add protectFromForgery to controllers/Controller.cfc, add csrfMetaTags to layouts, configure AJAX calls to post with X-CSRF-TOKEN HTTP header
  • Add config settings for storing authenticityToken in session (default) or encrypted cookie
  • Make arguments for protectForForgery configurable via set
  • Update CHANGELOG
@chrisdpeters chrisdpeters self-assigned this Mar 28, 2016
@perdjurner perdjurner modified the milestone: 2.0.0 Mar 30, 2016
@chrisdpeters
Copy link
Contributor Author

chrisdpeters commented Apr 19, 2016

Added related isOptions and isHead methods in 8a81e85.

Documentation:

Work on this has begun!

@chrisdpeters
Copy link
Contributor Author

Docs for protectFromForgery

@chrisdpeters
Copy link
Contributor Author

Docs for csrfMetaTags

@chrisdpeters
Copy link
Contributor Author

chrisdpeters commented Jul 26, 2016

Docs for authenticityTokenField

@chrisdpeters
Copy link
Contributor Author

Start to upgrading instructions. After I get things a little more solidified, I'd like to move the info from the plugin page into the core docs.

@chrisdpeters
Copy link
Contributor Author

I'm happy to report that I finally have a cookie adapter implemented in v0.1.0 of the plugin. Now I will work to port this to the core, write tests, and finish up the docs.

@chrisdpeters
Copy link
Contributor Author

(I also want to "battle test" this new cookie adapter in our production apps as well. If there are any problems, we usually learn of them pretty fast.)

@chrisdpeters
Copy link
Contributor Author

@chrisdpeters
Copy link
Contributor Author

This has now landed in master! 🎉

I don't have time to look into the failing tests. The ones I looked into didn't make any sense.

@neokoenig
Copy link
Contributor

I managed to kick your tests through - passing!

@chrisdpeters
Copy link
Contributor Author

I'm sure you've explained before, but remind me what I need to do when I run into a situation like that?

@neokoenig
Copy link
Contributor

RDP in, open chrome and click on the "Redeploy" bookmark, then to be sure, click on the CF10 tests bookmark which will run them locally: I usually find it good to run them locally just to check it not throwing any genuine failures: then restart the test from Travis.

@chrisdpeters
Copy link
Contributor Author

@neokoenig Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants