Comments (3)
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.
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.
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)
- Make compatible with PHP.Gt/Dom's new Facade
- Dependabot
- SessionTokenStore HOT 1
- Use case: sending token as HTTP header? HOT 7
- Add packagist version indicator badge to readme
- Update CircleCI environment to Ubuntu 14.04 HOT 1
- Add csrf token meta tag to <head> HOT 3
- Change namespace to Gt\Csrf for consistency.
- DatabaseTokenStore
- Update test runner
- Coding styleguide
- Store POST data - do not use globals HOT 1
- Should tokens be stored in meta tag when generating one token per form? HOT 1
- Deprecation notices in PHP 7.1 HOT 2
- One token per form by default? HOT 1
- Update readme to show correct namespaces
- Don't use superglobals in examples
- TokenStore::verify does not need to return bool
- Only automate POST forms
- Use inbuilt crypto features of PHP 7.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csrf.