Closed Bug 1000684 Opened 10 years ago Closed 10 years ago

410 you must log in before using this part of bugzilla

Categories

(Bugzilla :: Bugzilla-General, defect)

4.4.4
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: shirphy74, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 5.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36

Steps to reproduce:

After upgrade bugzilla to Release 4.4.4 from 4.4.2, run the hook will get the error:
 410 you must log in before using this part of bugzilla

I use BZ::Client in my hook to get bug's information, the method is api_call("Bug.Search").
I can use bugzilla with browser( for example IE, Chrome).


Actual results:

The error is 
410 you must log in before using this part of bugzilla


Expected results:

I expect the hook will be valid after upgrade bugzilla
when create the bug from hook ,the error is the same:
Error: undef; 410; You must log in before using this part of Bugzilla.

the following is some code of the hook:

my $user = 'cmadmin';
my $password = '*****';

my $client = BZ::Client->new("url" => $url,
                                "user" => $user,
                                "password" => $password);
%params = {...};

      eval {
      	my $BugID = BZ::Client::Bug->create($client, \%params);
      	print "The bug created from $row is: $BugID \n";
      	...
      	
      };
      
     if ($@) {
	my $err = $@;
	if (ref($err) eq "BZ::Client::Exception") {
	print STDERR "Error: " . (defined($err->http_code()) ? $err->http_code() : "undef")
          . "; " . (defined($err->xmlrpc_code()) ? $err->xmlrpc_code() : "undef")
          . "; " . (defined($err->message()) ? $err->message() : "undef") . "\n";
        } else {
        	print STDERR "Error $err\n";
        }       
      }
BZ::Client must be fixed to pass the login token instead of login cookies. The Bugzilla API no longer generates login cookies which is why you get this error.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.