View Issue Details

IDProjectCategoryView StatusLast Update
16695Bug reportsRemoteControlpublic2020-10-14 11:54
Reportergabrieljenik Assigned Togabrieljenik  
PrioritynoneSeveritycrash 
Status closedResolutionfixed 
Product Version3.23.5 
Target Version3.x 
Summary16695: JSON RPC Remote Control methods are not sent as expected to server
DescriptionWhen calling: `$client->call('get_session_key', ...)` the client calls the server method `call` which doesn't exist.

jsonRCPClient magical method `__call()` makes `$method = 'call'` instead of `$method = 'get_session_key'`

As jsonRpcClient is used as client->call($method, $params), then __call() is invoked with $method = 'call'.
Strange this hasn't popup already.
TagsNo tags attached.
Complete LimeSurvey version number (& build)3.23.5
I will donate to the project if issue is resolvedNo
Browser
Database & DB-VersionMysql
Server OS (if known)
Webserver software & version (if known)
PHP Version7

Activities

gabrieljenik

gabrieljenik

2020-09-24 20:55

developer   ~59948

https://github.com/LimeSurvey/LimeSurvey/commit/ddde6a413a4635b41f298fb7e3b25e8adc7b1d2c#commitcomment-42694437
gabrieljenik

gabrieljenik

2020-09-24 21:19

developer   ~59949

This only happens on v3.
V4 is fine (https://github.com/LimeSurvey/LimeSurvey/blob/master/application/libraries/jsonRPCClient.php)
gabrieljenik

gabrieljenik

2020-09-24 21:20

developer   ~59950

https://github.com/LimeSurvey/LimeSurvey/pull/1603/
DenisChenu

DenisChenu

2020-09-25 15:27

developer   ~59961

> This only happens on v3.

When ? If you use the client of LimeSUrvey ?. I don't understand the way to reproduce.
DenisChenu

DenisChenu

2020-09-25 17:42

developer   ~59963

PS : i use weberhofer/jsonrpcphp without any issue since years now …

> When calling: $client->call('get_session_key', ...) the client calls the server method call which doesn't exist.

Where ? Who ?. What code ? Maybe this code is broken : we don't have to `$client->call('get_session_key', ...) `, the good way is `$sessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD );`

No need ->call …
gabrieljenik

gabrieljenik

2020-09-25 17:44

developer   ~59964

For repducing this: Run the remotecontrol::test() under application/controllers/admin/remotecontrol.php
DenisChenu

DenisChenu

2020-09-25 18:15

developer   ~59965

The bug are inside the function not in Class

` $client->call('get_session_key', array('admin', 'password'));` must be replaced by `$client->get_session_key( LS_USER, LS_PASSWORD );`
` $client->call('import_survey', array($sSessionKey, $sLSSData, 'lss', 'Test import by JSON_RPC'));` must be replaced by `$client->import_survey( $sSessionKey, $sLSSData, 'lss', 'Test import by JSON_RPC' );`

………

Follow mùanual advice
gabrieljenik

gabrieljenik

2020-10-12 22:16

developer   ~60162

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30574
lime_release_bot

lime_release_bot

2020-10-14 11:54

administrator   ~60201

Fixed in Release 3.24.1+201014

Related Changesets

LimeSurvey: 3.x-LTS 5e66549e

2020-10-12 22:16:01

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 16695: JSON RPC Remote Control methods are not sent as expected to server (#1603)

Restated the call method
Affected Issues
16695
mod - application/libraries/jsonRPCClient.php Diff File

Issue History

Date Modified Username Field Change
2020-09-24 20:55 gabrieljenik New Issue
2020-09-24 20:55 gabrieljenik Status new => assigned
2020-09-24 20:55 gabrieljenik Assigned To => gabrieljenik
2020-09-24 20:55 gabrieljenik Note Added: 59948
2020-09-24 21:19 gabrieljenik Note Added: 59949
2020-09-24 21:20 gabrieljenik Note Added: 59950
2020-09-25 15:27 DenisChenu Note Added: 59961
2020-09-25 17:42 DenisChenu Note Added: 59963
2020-09-25 17:44 gabrieljenik Note Added: 59964
2020-09-25 18:15 DenisChenu Note Added: 59965
2020-10-12 22:16 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS 5e66549e
2020-10-12 22:16 gabrieljenik Note Added: 60162
2020-10-12 22:16 gabrieljenik Resolution open => fixed
2020-10-14 11:54 lime_release_bot Note Added: 60201
2020-10-14 11:54 lime_release_bot Status assigned => closed