Giter Club home page Giter Club logo

csrfence's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

krptodr mimimoore

csrfence's Issues

Why MachineKey.Protect is being used?

Hi,

I was looking for a csrf prevention module and I found your library using nuget. Thanks for taking the time for making such important httpmodule available through nuget.

I'm looking through your code to get a better understanding how things work. I was wondering why you are using MachineKey.Protect() and Unprotect to encrypt the cookie's token. Why bother to protect the hidden field? Can't we just use the token that is used in the cookie in the hidden field? I'm trying to understand the added value encrypting the hiddenfield value.

Thanks!

Allow for SameSite configuration

We would like to see the configuration object to be extended to allow for configuring the Same-Site cookie flag

To be compatible with older .NET versions, this would most likely need to be done via string manipulation since the .NET API will not support the SameSite property

Possible to invalidate anti-CSRF tokens soon as they're used?

I'm working on getting a .NET web app of mine compliant with a security standard and I installed CSRFence to address a CSRF vulnerablity our penetration test vendor found. The vendor said CSRFence has helped but there is still an issue. They're now saying:

"once a valid anti-CSRF token is generated for a particular account, it can also be used for any other account as well. The back-end should perform the following additional checks:

  1. Back-end code should not allow an anti-CSRF token created for a particular account, to be used for another account. Otherwise an attacker can create a token for his own account and use it in a CSRF attack targeting another user. (Mandatory)
  2. Ideally, the system should invalidate the anti-CSRF token as soon as it is posted to the server. Multiple uses should be disallowed. (Optional)"

Is there a built-in way to configure/use CSRFence to do what they're asking or should I build this functionality into my web app?

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.