GithubHelp home page GithubHelp logo

revel-csrf's Introduction

Hi there!! โœ‹

  • ๐Ÿ‘ท I have been working with Dart and Flutter since October 2018.
  • ๐Ÿ”ญ Iโ€™m currently working on personal Flutter projects.
  • ๐Ÿ’ฌ Ask me about Flutter and Dart.
  • ๐Ÿ˜„ Pronouns: he/him.
  • โšก Fun fact: I used to own a Belgian cafรฉ in Chennai (India).

Languages & Tools

Stats

Spotify Playing ๐ŸŽง

Spotify Playing

revel-csrf's People

Contributors

allendang avatar cbonello avatar dndx avatar verdverm avatar yuki2006 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

revel-csrf's Issues

CSRF tokens don't work with secure cookies

when I set cookies.secure=true in app.conf

csrf tokens get regenerated with each request to the server

not sure if this is a revel-csrf issue or revel's decryption cookies failing

Support multipart?

Thanks for this filter, it's working great but I have found one small issue. I have a form with enctype="multipart/form-data", my guess is that this causes problems with sentToken = r.PostFormValue(fieldName). In this case my sentToken becomes an empty string and the csrf check fails.

update robfig references

revel moved to github.com/revel/revel

this is the error generated:

cannot use csrf.CSRFFilter (type func(*"github.com/robfig/revel".Controller, []"github.com/robfig/revel".Filter)) as type "github.com/revel/revel".Filter in array element

Revel tests and CSRF protected application

Has anybody ever used Revel tests with CSRF protected application? How tests can get CSRF token?

I can come up with the following solutions:

  1. Parse some page and get token
  2. Create an action which will return token when in dev mode.

Is there a better (less workaroundish) solution? How is this problem being solved in other frameworks?

Here is what I've managed to find:

  1. Node.js/Express related solution: http://stackoverflow.com/questions/18773846/how-to-test-endpoints-protected-by-csrf-in-node-js-express
    • Parse cookie received by tests and find token there
    • When in dev mode use a constant for token rather than a random string
  2. SAP in response to GET request with header X-CSRF-Token Value : Fetch returns token: https://scn.sap.com/thread/3484244

crashes on production

i found my production server crash without notice.
when more than 1 users access the system from another machine,
it somehow crashed

i ran manually your plugin with:
csrf.CSRFFilter(c, fc)

what could be the issue?

thanks

License

Can you include a LICENSE file for your repo?

csrf is needed for revel, wish your code had a license

filter keep regenerating

it seems to keep generating new csrf even for static assets files (js, css, img)
its causing the csrf to not work properly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.