Answers.Body: <p>I can confirm this is a bug on <a href="http://buildwithcraft.com/help/csrf-protection" rel="nofollow">Craft 2.2.2579</a> when CSRF protection is enabled.  Will get a fix out for it shortly and update this answer when it's done.</p>
  
  <p><strong>Update</strong>:</p>
  
  <p>Fixed in <a href="https://buildwithcraft.com/updates#build2582" rel="nofollow">Craft 2.2.2582</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-04T20:35:26.113Z
Answers.LastActivityDate: 2014-09-08T19:27:36.780Z
Answers.LastEditDate: 2014-09-08T19:27:36.780Z
Answers.UserDisplayName: Brad Bell
Body: <p>Since the update to version 2.2 I can't upload assets.</p>
  
  <p>I get this error message in the console:</p>
  
  <p>Failed to load resource: the server responded with a status of 400 (Bad Request)</p>
  
  <p>And the upload stops:
  <img src="https://i.sstatic.net/xNhgV.png" alt="upload error"></p>
  
  <p>Any idea why?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-04T01:32:27.220Z
Comments.Text: Anything relevant getting logged in your craft/storage/runtime/logs files?  You can search for [error] and [warning].
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-04T06:31:51.420Z
Comments.Text: Found this error in the logfile: "2014/09/04 06:21:06 [error] [exception.CHttpException.400] exception 'CHttpException' with message 'The CSRF token could not be verified.' in /home/netsh107500/html/craft/app/framework/web/CHttpRequest.php:1247"
Comments.UserDisplayName: Christian Steger
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-04T06:34:34.173Z
Comments.Text: I don't know why because the Cookie is set: CRAFT_CSRF_TOKEN aebf01121550bc05e312fd6f1b628b07fde5db3bs%3A40%3A%22ed2516a95487688aafbbaa57c709811e87b79bfc%22%3B dev.local / Session 114 B ✓
Comments.UserDisplayName: Christian Steger
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-04T06:35:06.433Z
Comments.Text: When I set enableCsrfProtection to false the upload works.
Comments.UserDisplayName: Christian Steger
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-04T06:36:24.360Z
Comments.Text: Everything else with enableCsrfProtection enabled works fine (forms in frontend and backend editing).
Comments.UserDisplayName: Christian Steger
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-04T15:00:25.417Z
Comments.Text: Hey guys, I'm having this same issue. <h2>Bad Request</h2><p>The CSRF token could not be verified.</p>[error] [exception.CHttpException.400] exception 'CHttpException' with message 'The CSRF token could not be verified.' in */craft/app/framework/web/CHttpRequest.php:1247
Comments.UserDisplayName: Peter Tell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-08T21:33:09.450Z
Comments.Text: This should be fixed in [Craft 2.2.2582](http://buildwithcraft.com/updates#build2582).
Comments.UserDisplayName: Brandon Kelly
Tags: <error-message><upload>
Title: Craft 2.2 with enabled enableCsrfProtection: Failed to load resource: the server responded with a status of 400 (Bad Request)
ThreadText: # Craft 2.2 with enabled enableCsrfProtection: Failed to load resource: the server responded with a status of 400 (Bad Request)
  
  (Asked by: username_0 on 2014-09-03)
  
  Since the update to version 2.2 I can't upload assets.
  
  I get this error message in the console:
  
  Failed to load resource: the server responded with a status of 400 (Bad Request)
  
  And the upload stops:
  ![upload error](https://i.sstatic.net/xNhgV.png)
  
  Any idea why?
  
  **Tags:** error-message, upload
  
  > **Comments:**
  > **username_1**: Anything relevant getting logged in your craft/storage/runtime/logs files?  You can search for [error] and [warning].  
  > **username_0**: Found this error in the logfile: "2014/09/04 06:21:06 [error] [exception.CHttpException.400] exception 'CHttpException' with message 'The CSRF token could not be verified.' in /home/netsh107500/html/craft/app/framework/web/CHttpRequest.php:1247"  
  > **username_0**: I don't know why because the Cookie is set: CRAFT_CSRF_TOKEN aebf01121550bc05e312fd6f1b628b07fde5db3bs%3A40%3A%22ed2516a95487688aafbbaa57c709811e87b79bfc%22%3B dev.local / Session 114 B ✓  
  > **username_0**: When I set enableCsrfProtection to false the upload works.  
  > **username_0**: Everything else with enableCsrfProtection enabled works fine (forms in frontend and backend editing).  
  > **username_2**: Hey guys, I'm having this same issue. <h2>Bad Request</h2><p>The CSRF token could not be verified.</p>[error] [exception.CHttpException.400] exception 'CHttpException' with message 'The CSRF token could not be verified.' in */craft/app/framework/web/CHttpRequest.php:1247  
  > **username_3**: This should be fixed in [Craft 2.2.2582](http://buildwithcraft.com/updates#build2582).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-09-04. Score: 4 | Accepted answer
  
  I can confirm this is a bug on [Craft 2.2.2579](http://buildwithcraft.com/help/csrf-protection) when CSRF protection is enabled. Will get a fix out for it shortly and update this answer when it's done.
  
  **Update**:
  
  Fixed in [Craft 2.2.2582](https://buildwithcraft.com/updates#build2582).
  
  
  ---
  
  