From 93041368b58f5d362d492d3ac2cc02c45ae56a23 Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 5 Feb 2013 08:50:38 +0100 Subject: [PATCH] [HttpFoundation] JsonResponse::prefixJson --- components/http_foundation/introduction.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/http_foundation/introduction.rst b/components/http_foundation/introduction.rst index 87c6bf8f546..0fe7e19ce40 100644 --- a/components/http_foundation/introduction.rst +++ b/components/http_foundation/introduction.rst @@ -467,6 +467,11 @@ the response content will look like this: handleResponse({'data': 123}); +.. versionadded:: 2.3 + The :method:`Symfony\\Component\\HttpFoundation\\JsonResponse::prefixJson` has + been added to help mitigating CSRF attacks when sending a JSON response. The + prefix should be stripped on the client side before the JSON is parsed. + Session -------