<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8175</bug_id>
          
          <creation_ts>2015-08-17 15:26:59 +0000</creation_ts>
          <short_desc>CSRF token not provided</short_desc>
          <delta_ts>2015-09-09 11:37:35 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>1.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.9 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Wood">michael.g.wood</reporter>
          <assigned_to name="Michael Wood">michael.g.wood</assigned_to>
          <cc>alexandru.damian</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>bogdanx.a.voiculescu</cc>
    
    <cc>cristiana.voicu</cc>
    
    <cc>jessica.zhang</cc>
          
          <qa_contact name="Cristina Agurida">cristina-danielax.agurida</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>53150</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2015-08-17 15:26:59 +0000</bug_when>
    <thetext>Not all pages call the csrf token template function so django does not bother to send it, this means that all subsequent ajax calls fail unless they are marked as csrf exempt. 

&quot;Warning If your view is not rendering a template containing the csrf_token template tag, Django might not set the CSRF token cookie. This is common in cases where forms are dynamically added to the page. To address this case, Django provides a view decorator which forces setting of the cookie: ensure_csrf_cookie(). &quot;

https://docs.djangoproject.com/en/1.8/ref/csrf/#ajax

I think we should add the function call to the base template to make sure that the token is sent, alternative we will need to decorate the views affected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53832</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2015-09-08 10:59:24 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=55f13d45561f0e14e38bb79203404a06bb91786b</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53874</commentid>
    <comment_count>2</comment_count>
    <who name="Cristina Agurida">cristina-danielax.agurida</who>
    <bug_when>2015-09-09 11:37:35 +0000</bug_when>
    <thetext>Verified on master: db92bc23880794be77373b0f2d8c26279dcecb84</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>