View Issue Details

IDProjectCategoryView StatusLast Update
13464Bug reportsRemoteControlpublic2018-03-15 13:41
ReporterErika3175 Assigned Toollehar  
Status closedResolutionfixed 
Product Version3.1.x 
Fixed in Version3.5.x 
Summary13464: Invalid SQL in "mail_registered_participants" RemoteControl API method

When using "mail_registered_participants" (with no third argument at least) RemoteControl API method, the resulting SQL is not valid for PostgreSQL databases.

It's currently resulting in : ...AND (emailstatus = "OK") ORDER BY tid
whereas it should be : ...AND (emailstatus = 'OK') ORDER BY tid

The second form should be fine at least with MySQL and PostgreSQL, and probably with other SQL-compliant databases...

Steps To Reproduce

include_once 'vendor/autoload.php';

define( 'LS_BASEURL', 'https://localhost/limesurvey/'); // adjust this one to your actual LimeSurvey URL
define( 'LS_USER', 'rpcuser' );
define( 'LS_PASSWORD', 'mypassword' );

// the survey to process
// instantiate a new client
$myJSONRPCClient = new \org\jsonrpcphp\JsonRPCClient( LS_BASEURL.'/admin/remotecontrol' );

// receive session key
$sessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD );

// call method
$response = $myJSONRPCClient->mail_registered_participants( $sessionKey, $survey_id) ;

catch (Exception $e)
echo $e->getMessage() ;

// release the session key
$myJSONRPCClient->release_session_key( $sessionKey );

Additional Information

Fix can be done in application/helpers/remotecontrol/remotecontrol_handle.php at line 2339

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.4.4
I will donate to the project if issue is resolvedNo
Database & DB-VersionPostgreSQL 9.4.5
Server OS (if known)Linux
Webserver software & version (if known)Apache 2.4
PHP Version5.6




2018-03-12 10:37

administrator   ~47009

Fix committed to master branch:



2018-03-12 10:38

administrator   ~47010

Thanks for reporting!

Related Changesets

LimeSurvey: master 0d093781

2018-03-12 10:37:00


Details Diff
Fixed issue 13464: Invalid SQL in "mail_registered_participants"
RemoteControl API method
Affected Issues
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

Issue History

Date Modified Username Field Change
2018-03-09 13:53 Erika3175 New Issue
2018-03-12 10:37 ollehar Changeset attached => LimeSurvey master 0d093781
2018-03-12 10:37 ollehar Note Added: 47009
2018-03-12 10:37 ollehar Assigned To => ollehar
2018-03-12 10:37 ollehar Resolution open => fixed
2018-03-12 10:38 ollehar Status new => resolved
2018-03-12 10:38 ollehar Fixed in Version => 3.5.x
2018-03-12 10:38 ollehar Note Added: 47010
2018-03-15 13:41 ollehar Status resolved => closed