View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
16538 | Bug reports | RemoteControl | public | 2020-07-29 17:40 | 2020-08-26 09:36 |
Reporter | TonyMonast | Assigned To | gabrieljenik | ||
Priority | high | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.3.5 | ||||
Summary | 16538: Can add 2 survey participantes with the same token with the RPC api | ||||
Description | The JSON_RPC api let you create two participants with the same token. Problems :
| ||||
Steps To Reproduce |
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 12 | ||||
Complete LimeSurvey version number (& build) | Version 4.3.5+200721 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | mysql 5.7.31 | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | 7.4.8 | ||||
@cdorin, when a developer is looking into this, please also make sure to check the LS3 code base. My guess is that the same issue exists there as well. |
|
@TonyMonast, we noted that the same also applies to email addresses (tested with Limesurvey 3.22.27). Usually Limesurvey doesn't allow the same email address for multiple entries at the participant table. But using the API there seems to be no warning or the like. Can you confirm this? @DenisChenu, what do you think is the best way to deal with this? I think similar to the admin features, the API should throw errors if duplicate tokens or emails are added. In addition we could add additional parameters for enabling/disabling filters for duplicate tokens/emails/..., what do you think? |
|
@Mazi, I confirm that I am able to create two participants with the same email with the JSON_RPC API. You suggested "In addition we could add additional parameters for enabling/disabling filters for duplicate tokens/emails/", do you mean a parameter to allow duplicate entry (email and token) like I'm able to create? If so, note that when there is a duplicate token in the participants list, it causes other bugs like the ones I mentioned. The system assumes that the participant token is unique, and if you allow having a duplicate token, I suppose you will have to change a lot of code to support this. |
|
Exactly the same ? Are you sure you don't have a space ?
@Mazi : email adress are not a issue , token are an issue … email adress is a misfeature … (and need a separate mantis number) |
|
|
|
@DenisChenu Yes, exactly the same token, no space. See the new screenshot. |
|
To reproduce that, you need to do 2 separates calls to the api. |
|
OK: encryptsave don't validate … https://github.com/LimeSurvey/LimeSurvey/blob/100f7ffa44d350649074080d33ecddadaa23042d/application/models/LSActiveRecord.php#L390 |
|
Adding validation to the save operation. What I have seen is that encryptSave doesn't do validation by default. |
|
Uploaded unit test. Also it is to notice we should, on another story, turn validation = TRUE for the encryptSave. |
|
When do you plan to merge the code to release a new version that fixes this bug? Currently I either have to modify the code of our LimeSurvey installations or make my application handles duplicates and not LimeSurvey, which makes the code over-complicated for nothing. Thank you! |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30419 |
|
Fixed in Release 4.3.14+200826 |
|
LimeSurvey: master b11095ae 2020-08-05 02:09 Details Diff |
Fixed issue 16538: Can add 2 survey participantes with the same token with the RPC api Adding validation to the save operation |
Affected Issues 16538 |
|
mod - application/helpers/remotecontrol/remotecontrol_handle.php | Diff File | ||
LimeSurvey: master e17c8179 2020-08-20 02:39 Details Diff |
Fixed issue 16538: Can add 2 survey participantes with the same token with the RPC api Encrypt and validation unit test |
Affected Issues 16538 |
|
mod - tests/unit/models/EncryptAttributesTest.php | Diff File | ||
LimeSurvey: master 4613f217 2020-08-24 23:26 Details Diff |
Fixed issue 16538: Can add 2 survey participantes with the same token with the RPC api testAddParticipants remote control unit test |
Affected Issues 16538 |
|
mod - tests/unit/helpers/RemoteControlTest.php | Diff File | ||
LimeSurvey: master 6d63d832 2020-08-25 13:36 Committer: GitHub Details Diff |
Fixed issue 16538: Can add 2 survey participantes with the same token with the RPC api |
Affected Issues 16538 |
|
mod - application/helpers/remotecontrol/remotecontrol_handle.php | Diff File | ||
mod - tests/unit/helpers/RemoteControlTest.php | Diff File | ||
mod - tests/unit/models/EncryptAttributesTest.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-07-29 17:40 | TonyMonast | New Issue | |
2020-07-29 17:40 | TonyMonast | File Added: participants.png | |
2020-07-29 19:17 | TonyMonast | Issue Monitored: TonyMonast | |
2020-07-29 20:05 | cdorin | Priority | none => high |
2020-07-29 20:05 | cdorin | Status | new => confirmed |
2020-07-29 20:05 | cdorin | Zoho Sprints | => |Yes| |
2020-07-29 20:05 |
|
Zoho Sprints ID | => 14469000000197013 |
2020-08-03 12:55 | Mazi | Note Added: 59264 | |
2020-08-03 17:44 | Mazi | Note Added: 59273 | |
2020-08-03 17:58 | TonyMonast | Note Added: 59274 | |
2020-08-03 19:48 | DenisChenu | Note Added: 59275 | |
2020-08-03 19:49 | DenisChenu | Note Added: 59276 | |
2020-08-03 19:49 | DenisChenu | Note Edited: 59276 | |
2020-08-03 20:01 | TonyMonast | Note Added: 59277 | |
2020-08-03 20:01 | TonyMonast | File Added: duplicate-tokens.png | |
2020-08-03 20:03 | TonyMonast | Note Added: 59278 | |
2020-08-03 21:04 | DenisChenu | Note Added: 59279 | |
2020-08-05 00:13 | gabrieljenik | Note Added: 59310 | |
2020-08-05 00:13 | gabrieljenik | Note Edited: 59310 | |
2020-08-20 00:43 | gabrieljenik | Note Added: 59537 | |
2020-08-24 19:37 | TonyMonast | Note Added: 59597 | |
2020-08-25 11:36 | ollehar1 | Changeset attached | => LimeSurvey master 6d63d832 |
2020-08-25 11:36 | gabrieljenik | Changeset attached | => LimeSurvey master 4613f217 |
2020-08-25 11:36 | gabrieljenik | Changeset attached | => LimeSurvey master e17c8179 |
2020-08-25 11:36 | gabrieljenik | Changeset attached | => LimeSurvey master b11095ae |
2020-08-25 11:36 | gabrieljenik | Note Added: 59602 | |
2020-08-25 11:36 | gabrieljenik | Assigned To | => gabrieljenik |
2020-08-25 11:36 | gabrieljenik | Resolution | open => fixed |
2020-08-26 09:36 | lime_release_bot | Zoho Sprints | Yes => |Yes| |
2020-08-26 09:36 | lime_release_bot | Note Added: 59614 | |
2020-08-26 09:36 | lime_release_bot | Status | confirmed => closed |
2021-08-03 04:34 | guest | Bug heat | 10 => 12 |