]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1051056: The REST API needs to be versioned so that new changes can be made that...
authorDavid Lawrence <dkl@mozilla.com>
Fri, 10 Apr 2015 15:34:53 +0000 (16:34 +0100)
committerDavid Lawrence <dkl@mozilla.com>
Fri, 10 Apr 2015 15:34:53 +0000 (16:34 +0100)
- Fix issue where PUT requests were treated as GET and failed when updating a bug, etc.

Bugzilla/API/1_0/Server.pm

index 6136440cf2f561b7d5107eda9c671c44d5b52f58..108c25e274c677b901e937eaff15d7f5aa3e65b9 100644 (file)
@@ -260,7 +260,8 @@ sub _params_check {
         }
     }
 
-    if ($self->request->method eq 'POST') {
+    if ($self->request->method eq 'POST'
+        || $self->request->method eq 'PUT') {
         # CSRF is possible via XMLHttpRequest when the Content-Type header
         # is not application/json (for example: text/plain or
         # application/x-www-form-urlencoded).