403 Forbidden Error

I have spent countless hours trying to figure how to use the jsonrpc.cgi
service for Bugzilla 4.4.12 and cannot seem to get past this.  My ultimate
goal is to post new bugs into bugzilla using the jsonrpc.cgi webservice but
have just gotten nowhere..

After trying for sometime on my own installation I thought that perhaps my
installation was bad so I have tried on the landfill.bugzilla.org
installation and come up with the exact same error so there is something
wrong with the way that I am handling the submission or something..

In its simplest terms, I can properly use the service with "GET" and can
return the time and even users of the Bugzilla database but when I try to
"POST" to the jsonrpc.cgi I am stopped dead in my tracks..

Here is the code that I have
 <?php
  ob_start();
// Get cURL resource
$curl = curl_init();
// Set some options - we are passing in a useragent too here
curl_setopt_array($curl, array(
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => '
https://landfill.bugzilla.org/bugzilla-4.4-branch/jsonrpc.cgi',
    CURLOPT_USERAGENT => 'Codular Sample cURL Request',
    CURLOPT_POST => 1,
    CURLOPT_HEADER =>1,
    CURLOPT_POSTFIELDS => array(
        Bugzilla_login => 'username',
        Bugzilla_password => 'password'

    )
));
// Send the request & save response to $resp
$response = curl_exec($curl);
  echo $response;
  ?>

The response is as follows
HTTP/1.1 100 Continue HTTP/1.1 403 Date: Fri, 21 Apr 2017 00:28:09 GMT
Server: Apache X-xss-protection: 1;
mode=block Strict-transport-security:
max-age=604800 X-frame-options: SAMEORIGIN X-content-type-options: nosniff
Set-Cookie: Bugzilla_login_request_cookie=fu3J3IC8TP;
path=/bugzilla-4.4-branch/; secure;
HttpOnly Transfer-Encoding: chunked Content-Type: application/json;
charset=UTF-8 No data.

Note that a Cookie Bugzilla_login_request_Cookie is returned so it appears
that something is getting through to the service regardless of the 403
 error.. even so, if I pass this cookie back to the jsonrpc.cgi as a cookie
header I still get a 403.

What am I doing wrong? It must be something silly that I am doing but I am
just stuck and need a push.

Any ideas or help would be greatly appreciated
0
Shane
4/21/2017 1:25:37 AM
mozilla.support.bugzilla 9756 articles. 0 followers. Post Follow

1 Replies
3 Views

Similar Articles

[PageSpeed] 18

If this cannot be done with jsonrpc.cgi.. Where are some good examples of the XMLRPC?
0
Shane
4/21/2017 3:03:29 AM
Reply: