Giter Site home page Giter Site logo

Implement token time-outs about csrf HOT 3 CLOSED

phpgt avatar phpgt commented on July 28, 2024
Implement token time-outs

from csrf.

Comments (3)

g105b avatar g105b commented on July 28, 2024

Keep it configurable, but by default I don't see a problem having a very long timeout. The problem with sessions is that they could go on indefinitely for people like me who don't ever close their browser.

2 or 3 hours doesn't seem like it would be a problem. I can see pages waiting to be submitted for over an hour - I do it some times with government/accounting forms.

from csrf.

j4m3s avatar j4m3s commented on July 28, 2024

I've been stewing on this... And even started coding a solution... But I've concluded it's a dumb idea.

A 64 char+digit token means there are 4e99 possible combinations of token. Even if there were a million valid tokens floating around for a user, it would still mean the chance of bluffing a valid token would be 1 in 4e93. On average it would therefore take 6e79 years of trying one million tokens per second to succeed in a csrf attempt. Not really a valid problem.

However, this does prompt a much more valid potential issue - the memory or capacity impact of lots and lots of valid tokens kicking around on a busy site.

@g105b if you agree please can you close this ticket? I'll raise a new one for limiting the memory footprint for busy sites. That will take some discussion...

from csrf.

g105b avatar g105b commented on July 28, 2024

I do agree! Good thinking - there was an issue in there somewhere, but it turned out to be a different one.

from csrf.

Related Issues (20)

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.