1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-07 16:59:22 +00:00

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>
This commit is contained in:
Alexandru DAMIAN
2015-02-26 21:41:59 +00:00
committed by Richard Purdie
parent ee1af30548
commit 6768a3069d
4 changed files with 4 additions and 0 deletions
@@ -117,6 +117,7 @@
var tooltipUpdateText;
/* ensure csrf cookie exists {% csrf_token %} */
function _makeXHREditCall(data, onsuccess, onfail) {
$.ajax( {
type: "POST",
@@ -156,6 +156,7 @@
<script>
/* ensure csrf cookie exists {% csrf_token %} */
function _makeXHRBuildCall(url, data, onsuccess, onfail) {
$.ajax( {
type: "POST",
@@ -429,6 +429,7 @@
// re-assert the event handlers
}
/* ensure cookie exists {% csrf_token %} */
function postEditAjaxRequest(reqdata) {
var ajax = $.ajax({
type:"POST",
@@ -120,6 +120,7 @@
var tooltipUpdateText;
/* ensure csrf cookie exists {% csrf_token %} */
function _makeXHREditCall(data, onsuccess, onfail) {
$.ajax( {
type: "POST",