ZABBIX BUGS AND ISSUES

Logout API operation doesn't work

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.8.4, 2.0.2
  • Fix Version/s: 2.0.4rc1, 2.1.0
  • Component/s: API (A)
  • Environment:
    Debian Lenny
  • Zabbix ID:
    RTF

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

Issue Links

Activity

Hide
nelsonab added a comment -

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

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

Show
nelsonab added a comment - Any reason for this not being fixed in 1.8.x? Zabcon bug: trac.red-tux.net/ticket/90
Hide
Maks added a comment -

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..' }}

Show
Maks added a comment - 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..' }}
Hide
Alexey Fukalov added a comment -

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

Show
Alexey Fukalov added a comment - dev branch: svn://svn.zabbix.com/branches/dev/ZBX-3907
Hide
Alexey Fukalov added a comment - - edited

(1) docs

Alexey Fukalov RESOLVED

<Toms> CLOSED

Show
Alexey Fukalov added a comment - - edited (1) docs Alexey Fukalov RESOLVED <Toms> CLOSED
Hide
Toms added a comment - - edited

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

Alexey Fukalov RESOLVED

<Toms> CLOSED

Show
Toms added a comment - - edited (2) It would be nice to log out not providing any parameters to user.logout Alexey Fukalov RESOLVED <Toms> CLOSED
Hide
Toms added a comment -

TESTED

Show
Toms added a comment - TESTED
Hide
Alexey Fukalov added a comment -

Fixed in 2.0.4rc1 r30542, pre-2.1.0 r30543.

Show
Alexey Fukalov added a comment - Fixed in 2.0.4rc1 r30542, pre-2.1.0 r30543.
Hide
richlv added a comment - - edited

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

Alexey Fukalov added to changelog

<richlv> CLOSED

Show
richlv added a comment - - edited (3) this seems to be missing from http://www.zabbix.com/documentation/2.0/manual/appendix/api/changes_2.0 ? Alexey Fukalov added to changelog <richlv> CLOSED

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: