From 06da34e74687de919804c87c8d5e15edbc570522 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Fri, 10 Apr 2015 16:34:53 +0100 Subject: Bug 1051056: The REST API needs to be versioned so that new changes can be made that do not break compatibility - Fix issue where PUT requests were treated as GET and failed when updating a bug, etc. --- Bugzilla/API/1_0/Server.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Bugzilla/API') diff --git a/Bugzilla/API/1_0/Server.pm b/Bugzilla/API/1_0/Server.pm index 6136440cf..108c25e27 100644 --- a/Bugzilla/API/1_0/Server.pm +++ b/Bugzilla/API/1_0/Server.pm @@ -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). -- cgit v1.2.3-24-g4f1b