View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
13783Bug reportsRemoteControlpublic2018-06-27 15:29
Reporters4Luux Assigned Todominikvitt 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version3.10.x 
Fixed in Version3.11.x 
Summary13783: [json-API] token in add_response causes errors and does not work in update_response
Description

The token attribute given in the response of add_response causes a "Not response.ok". update_response ignores the token completely.

Steps To Reproduce

Here's an example query:
{"method": "add_response", "params": {"sSessionKey": "xxxxx", "iSurveyID": "253371", "aResponseData": {"token": "9ceBpkatcfGevGG1WAzvSksr42JLOtnx", "253371X1X1SQ001": "A2"}}, "id": 1}

If i delete the token, it works fine:
{"method": "add_response", "params": {"sSessionKey": "xxxxx", "iSurveyID": "253371", "aResponseData": {"253371X1X1SQ001": "A2"}}, "id": 1}

I've tested this with even more answer data and still get the same result. Howewer, in the answer database the data will still be added correctly. It just causes the "not ok" response, what's kinda weird.

In addition, update_response has a similar problem.
With a query like
{"method": "update_response", "params": {"sSessionKey": "xxxxx", "iSurveyID": "253371", "aResponseData": {"id": "142", "token": "9ceBpkatcfGevGG1WAzvSksr42JLOtnx", "253371X1X1SQ001": "A2", "253371X1X2SQ001": "A3", "253371X2X3SQ001": "A4", "253371X2X8": "abcdefg"}}, "id": 1}

There's no error at this time, but the answer database will recieve anything EXCEPT the token this time. (I removed the real sessionKey btw)

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build) limesurvey3.11.0+180612
I will donate to the project if issue is resolvedNo
Browser
Database type & version52 (that was the latest stable when I remember correctly?)
Server OS (if known)Windows 10
Webserver software & version (if known)XAMPP as provided in the package
PHP Version5.6.8

Users monitoring this issue

There are no users monitoring this issue.

Activities

guest

guest

2018-06-15 18:23

viewer   ~48186

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=27439

dominikvitt

dominikvitt

2018-06-15 18:24

developer   ~48187

Both functions are working as expected.

c_schmitz

c_schmitz

2018-06-27 15:29

administrator   ~48344

Version 3.12.3+180627 released

Related Changesets

LimeSurvey: master e2a3a8b6

2018-06-15 18:22:53

Dominik Vitt

Details Diff
Fixed issue 13783: [json-API] token in add_response causes errors and does not work in update_response Affected Issues
13783
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

Issue History

Date Modified Username Field Change
2018-06-15 14:57 s4Luux New Issue
2018-06-15 15:18 c_schmitz Assigned To => dominikvitt
2018-06-15 15:18 c_schmitz Status new => assigned
2018-06-15 15:18 c_schmitz Priority none => normal
2018-06-15 18:23 Changeset attached => LimeSurvey master e2a3a8b6
2018-06-15 18:23 guest Note Added: 48186
2018-06-15 18:23 guest Resolution open => fixed
2018-06-15 18:24 dominikvitt Status assigned => resolved
2018-06-15 18:24 dominikvitt Fixed in Version => 3.11.x
2018-06-15 18:24 dominikvitt Note Added: 48187
2018-06-27 15:29 c_schmitz Note Added: 48344
2018-06-27 15:29 c_schmitz Status resolved => closed