From 96dad60ef7c2ce5933b191f447b855be9f4995ca Mon Sep 17 00:00:00 2001 From: Jim Manico Date: Sun, 3 Dec 2023 14:24:31 -0800 Subject: [PATCH] Update Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.md small link fix --- .../Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.md b/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.md index 92e4f8ed44..513babfde2 100644 --- a/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.md +++ b/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.md @@ -49,9 +49,9 @@ CSRF tokens should be: CSRF tokens prevent CSRF because without a CSRF token, an attacker cannot create valid requests to the backend server. -**In Synchronized patterns, CSRF tokens should not be transmitted using cookies** +#### Transmissing CSRF tokens In Synchronized Patterns -The CSRF token can be transmitted to the client as part of a response payload, such as a HTML or JSON response, then it can be transmitted back to the server as a hidden field on a form submission or via an AJAX request as a custom header value or part of a JSON payload. A CSRF token must not be leaked in the server logs or in the URL. GET requests can potentially leak CSRF tokens at several locations, such as the browser history, log files, network utilities that log the first line of a HTTP request, and Referer headers if the protected site links to an external site. +The CSRF token can be transmitted to the client as part of a response payload, such as a HTML or JSON response, then it can be transmitted back to the server as a hidden field on a form submission or via an AJAX request as a custom header value or part of a JSON payload. a CSRF token should not be transmitted in a cookie for synchronized patterns. A CSRF token must not be leaked in the server logs or in the URL. GET requests can potentially leak CSRF tokens at several locations, such as the browser history, log files, network utilities that log the first line of a HTTP request, and Referer headers if the protected site links to an external site. For example: