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:
parent
ee1af30548
commit
6768a3069d
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue