Skip to contentSkip to conversation

toastergui: Call csrf function in all pages to ensure cookie is sent

PATCH In review Michael Wood 2 participants 2 messages Aug 17, 2015 – Aug 19, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toastergui: Call csrf function in all pages to ensure cookie is sent

Not all pages call the csrf token template function so django does not bother to send the cookike, this meant that all subsequent ajax calls fail. So add this to the base template.

[YOCTO #8175]

---
 bitbake/lib/toaster/toastergui/templates/base.html | 1 +
 1 file changed, 1 insertion(+)
bitbake/lib/toaster/toastergui/templates/base.html +1 -0
index d75bf16..f187100 100644
@@ -69,6 +69,7 @@
 
 <body style="height: 100%">
 
+  {% csrf_token %}
   <div id="loading-notification" class="alert lead text-center" style="display:none">
     Loading <i class="fa-pulse icon-spinner"></i>
   </div>
Signature · 1 line
2.1.4
#1 lore raw

Thanks, submitted upstream.
-bavery

Quoted 31 lines · Michael Wood

Not all pages call the csrf token template function so django does not bother to send the cookike, this meant that all subsequent ajax calls fail. So add this to the base template.

[YOCTO #8175]

---
 bitbake/lib/toaster/toastergui/templates/base.html | 1 +
 1 file changed, 1 insertion(+)
bitbake/lib/toaster/toastergui/templates/base.html +1 -1
index d75bf16..f187100 100644
@@ -69,6 +69,7 @@
 
 <body style="height: 100%">
 
+  {% csrf_token %}
   <div id="loading-notification" class="alert lead text-center" style="display:none">
     Loading <i class="fa-pulse icon-spinner"></i>
   </div>
--

2.1.4

--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster