I know that to protect web applications from Cross Site Request Forgery, the only secure method is implementing a CSRF token. My question is, isn't it possible to use the CSRF token to track sessions also? Why should we implement a different session id to track the sessions?
What is the purpose of using a session id when csrf protection is already implemented?
2.4k Views Asked by Anonymous Platypus At
1
There are 1 best solutions below
Related Questions in SESSION
- Access property of an object of type [Model] in JQuery
- __PHP_Incomplete_Class Object even though class is included before session started
- Safari Extension not geting session Info
- Laravel: Locale Session: Controller gets Parameter to change it but it cant. U have to hardcode it
- Does OPEN SYMMETRIC KEY (SQL Server) remain in scope on a server farm?
- Superagent share session / cookie info with actual browser
- Session Destroyed on page refresh
- MVC Referencing strongly typed session objects on my view
- What is the best way to persist a global array in php?
- Error in indicies while unsetting Sessions
- Server side PHP session is not working in android
- Laravel - session data survives log-out/log-in, even for different users
- The page isn't redirecting properly when I logout
- Session array unset and delete row
- Validating a login using PHP
Related Questions in COOKIES
- Scrapy encountered http status <521>
- NodeJS not getting cookie
- How to accept cookies when using a webservice - Android?
- I Want to get the page count using cookie
- Superagent share session / cookie info with actual browser
- CookieContainer does not store cookies for internationalized domain names
- Setting a cookie in Wordpress functions.php - cant echo it using an other function
- JavaScript's document.cookie does not replace cookie in the subdomain
- How to assign cookie expiry date?
- How to read a JavaScript cookie?
- How can I redirect to an error page in my Play app?
- Python - Cookies & BeautifulSoup
- Express.js CookieParser does not get Angular.js $cookies
- Check Cookies AND Session in Same IF Statement
- How do I read the value of a cookie that comes with a cross domain image?
Related Questions in TOKEN
- .net Web Api 2 Owin authentication token expires suddenly and often on IIS 8.5
- search with filter by token count
- How to token paste a number?
- Ember.js REST Auth Headers
- django rest framework - token authentication logout
- Is my JWT refresh plan secure?
- PHP token security
- GCM get invalid tokens when sending to multiple devices at once
- Uncaught SyntaxError: Unexpected token < in HTML - can't solve
- TERADATA - How to split a character column and keep the last token?
- Oauth refresh token provider error in ValidateClientAuthentication
- First authentification in order to get token
- does Token Based Authentication requires to store token in DB?
- Play Framework: How to Add a Header to Every Response
- Meteor app deploying with Modulus
Related Questions in CSRF
- CSRFProtector PHP library won't submit any form data
- Can I use plone.protect 3.0 with Plone 4.3?
- CORS and CSRF(XSRF)
- XHR2 file upload to subdomain token mismatch in Laravel5.1/nginx upload module
- Laravel X-CSRF-Token mismatch with POSTMAN
- Should all the form's submit work after a valid one submit with CSRF?
- Does an anonymous comment/post form need csrf token? If not why does SO use it and how to implement it?
- How to know if my CSRF is working?
- Csurf invalid csrf token Express / nodejs
- Django CSRF cookie not set error if there is cookie value starting with square brackets '['
- Invalid authentication token after session timeout
- Is Encrypted Token Pattern CSRF protection immune to BREACH attack?
- Verifying that Play's CSRF protection is working
- Would I need CSRF if using JWT?
- Django Rest Framework remove csrf
Related Questions in SESSIONID
- What is the purpose of using a session id when csrf protection is already implemented?
- Response.write only shows the first record from the database (this.session.sessionid)
- How to remove session id "/?___SID=U" from home page URL using .htaccess
- Django generates a new session ID on every API call
- PHP/MySQL code won't insert userid and password into table
- Object moved to here in response of Jmeter request
- Explanation for session_regenerate_id() proper usage
- Disable session id based on cookies in RAP to use multiple browsers and tabbed browsing
- Jquery File Upload change session id
- Display sql database values in textboxes using the session id
- How to get the session ID of session in a remote machine?
- SRTServletRequest getSession(true) returns HttpSession with same sessionId
- ASP.Net session behavior in Internet Explorer
- Loosin session id over SSL
- Solution for handling Spring security session Id in different wed apps
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
A CSRF token is a value that must be generated randomly and associated to a session (a user) in EVERY GET that shows a form to prevent false POST. This false POST comes from the user browser too so, to authenticate the POST, you need a session with the token stored in server memory to compare if the token that comes with the POST is the same that is stored in user session.
Also, web app's should need to identify users in a GET and CSRF tokens are only in POST.
Session need to be static to identify user along time and several request due to disconnected nature of HTTP. CSRF changes in every GET, it can not be used like session.
On the other hand, what should server do with your idea? Create a new session every GET request and copy all previous session data to the new session? This is crazy.
Take a look to this pdf at Montana State University. It helped me to understand CSRF.