[ZBX-3907] Logout API operation doesn't work Created: 2011 Jun 27  Updated: 2017 May 30  Resolved: 2012 Oct 04

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 1.8.4, 2.0.2
Fix Version/s: 2.0.4rc1, 2.1.0

Type: Incident report Priority: Critical
Reporter: Jacobo Aragunde PĂ©rez Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: api, authentication
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian Lenny


Issue Links:
Duplicate
is duplicated by ZBX-4465 api logout fails with "JSON-rpc error... Closed
is duplicated by ZBX-5501 JSON API logout doesn't work. Closed

 Description   

I've tried the API operation user.logout in different ways but it always returns an error; besides there is no documentation of the operation so I don't know which is the correct way.

I've specified the details (data sent and returned) in this forum thread:

http://www.zabbix.com/forum/showthread.php?p=86577



 Comments   
Comment by nelsonab [ 2011 Dec 22 ]

Any reason for this not being fixed in 1.8.x?

Zabcon bug: trac.red-tux.net/ticket/90

Comment by Maks [ 2012 Feb 03 ]

solution:

diff:

      • class.cuser.php.old 2011-10-05 11:02:30.000000000 +0400
      • class.cuser.php 2011-10-05 11:01:13.000000000 +0400
        ***************
      • 1113,1118 ****
      • 1113,1119 ----
        public static function logout($sessionid){
        global $ZBX_LOCALNODEID;

+ $sessionid = $sessionid['sessionid'];
$sql = 'SELECT s.* '.
' FROM sessions s '.
' WHERE s.sessionid='.zbx_dbstr($sessionid).

query (perl syntax): {... ,method => 'user.logout', params =>

{ sessionid => 'asdgg..' }

}

Comment by Alexey Fukalov [ 2012 Sep 17 ]

dev branch: svn://svn.zabbix.com/branches/dev/ZBX-3907

Comment by Alexey Fukalov [ 2012 Sep 17 ]

(1) docs

Vedmak RESOLVED

<Toms> CLOSED

Comment by Toms (Inactive) [ 2012 Sep 18 ]

(2) It would be nice to log out not providing any parameters to user.logout

Vedmak RESOLVED

<Toms> CLOSED

Comment by Toms (Inactive) [ 2012 Sep 18 ]

TESTED

Comment by Alexey Fukalov [ 2012 Oct 04 ]

Fixed in 2.0.4rc1 r30542, pre-2.1.0 r30543.

Comment by richlv [ 2012 Oct 04 ]

(3) this seems to be missing from http://www.zabbix.com/documentation/2.0/manual/appendix/api/changes_2.0 ?

Vedmak added to changelog

<richlv> CLOSED

Generated at Sat Apr 20 00:08:24 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.