diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-02-26 21:41:59 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-27 07:36:07 +0000 |
commit | 6768a3069da45b3512601d8361bf64f06ee11e6f (patch) | |
tree | 68a2cfd1cc1f146e731e349aa6ccc30b4201366b /bitbake/lib/toaster/toastergui/templates | |
parent | ee1af30548a6ac3f243c9ee61f0988aa307c0c6b (diff) | |
download | ast2050-yocto-poky-6768a3069da45b3512601d8361bf64f06ee11e6f.zip ast2050-yocto-poky-6768a3069da45b3512601d8361bf64f06ee11e6f.tar.gz |
bitbake: toastergui: add csrf tokens for AJAX calls
This patch adds CSRF tokens in pages using AJAX calls in
order to force Django to generate the CSRF cookie used to
authenticate the call.
(Bitbake rev: 6b2403992f1f5f84114ec9b243813957ff907051)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
4 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/layers.html b/bitbake/lib/toaster/toastergui/templates/layers.html index 5cfda5b..864e156 100644 --- a/bitbake/lib/toaster/toastergui/templates/layers.html +++ b/bitbake/lib/toaster/toastergui/templates/layers.html @@ -117,6 +117,7 @@ var tooltipUpdateText; +/* ensure csrf cookie exists {% csrf_token %} */ function _makeXHREditCall(data, onsuccess, onfail) { $.ajax( { type: "POST", diff --git a/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html b/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html index 08bb05d..d6e32f8 100644 --- a/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html @@ -156,6 +156,7 @@ <script> +/* ensure csrf cookie exists {% csrf_token %} */ function _makeXHRBuildCall(url, data, onsuccess, onfail) { $.ajax( { type: "POST", diff --git a/bitbake/lib/toaster/toastergui/templates/projectconf.html b/bitbake/lib/toaster/toastergui/templates/projectconf.html index 9cacce4..dde8a11 100644 --- a/bitbake/lib/toaster/toastergui/templates/projectconf.html +++ b/bitbake/lib/toaster/toastergui/templates/projectconf.html @@ -429,6 +429,7 @@ // re-assert the event handlers } + /* ensure cookie exists {% csrf_token %} */ function postEditAjaxRequest(reqdata) { var ajax = $.ajax({ type:"POST", diff --git a/bitbake/lib/toaster/toastergui/templates/targets.html b/bitbake/lib/toaster/toastergui/templates/targets.html index 234159a..690c6a5 100644 --- a/bitbake/lib/toaster/toastergui/templates/targets.html +++ b/bitbake/lib/toaster/toastergui/templates/targets.html @@ -120,6 +120,7 @@ var tooltipUpdateText; +/* ensure csrf cookie exists {% csrf_token %} */ function _makeXHREditCall(data, onsuccess, onfail) { $.ajax( { type: "POST", |