View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 16853 | Bug reports | Survey participants (Tokens) | public | 2020-11-23 12:22 | 2023-06-20 17:49 |
| Reporter | DenisChenu | Assigned To | c_schmitz | ||
| Priority | high | Severity | minor | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 3.25.0 | ||||
| Fixed in Version | 3.25.6 | ||||
| Summary | 16853: Inconsistent filter behaviour when create token | ||||
| Description | There are a complete inconsistent behavior on token filter in firstname, lastname and attribute Sometime : allow tag, sometimes not | ||||
| Steps To Reproduce | As super admin
And now : edit any of this participant : all tag was deleted .... | ||||
| Additional Information | The issue :
My proposed solution : use only model->rules. Without XSS system : always clean up HTML with HtmlPurifier or a complete flat way. If complete flat : need a javascript validation or an HTML5 validation : no filter without inform. LSA attached to see | ||||
| Tags | No tags attached. | ||||
| Attached Files | tokens_641657.csv (102 bytes)
firstname,lastname,email Via import <strong>strong</strong>,Last name: <em>em</em>,import@example.org | ||||
| Bug heat | 8 | ||||
| Complete LimeSurvey version number (& build) | 5.0.0 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | not relevant ? | ||||
| Database type & version | not relevant? | ||||
| Server OS (if known) | not relevant ? | ||||
| Webserver software & version (if known) | not relevant ? | ||||
| PHP Version | not relevant ? | ||||
| parent of | 17840 | closed | gabrieljenik | Participant attribute with html LS 5.2.9 |
|
About removing all tags : https://gfycat.com/fr/slimyvalidjavalina |
|
I think i prefer disallow tag and XSS for all user. |
|
|
Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30847 |
|
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30849 |
|
|
Added a PR https://github.com/LimeSurvey/LimeSurvey/pull/1721/files |
|
|
Arg … i cherry-pick … i check again master |
|
|
Fixed in Release 3.25.8+210118 |
|
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30907 |
|
|
Why would a superadmin not be allowed to use tags in token atributes? Can we please fix that so it is allowed, at least for the custom attributes. |
|
|
We have a discussion about this … maybe on zoho ? Because it was , before the update : disallowed totally. The alternate commit … |
|
|
PS : see https://bugs.limesurvey.org/view.php?id=16884 … |
|
|
The scenario would only be for superadmins, nobody else. |
|
|
Why superadmin ? |
|
|
Any admin can use email send to add bad value. We must avoid it for registering only. |
|
|
PS : since this commit i use bbcode when i need tag in attribute s⋅… |
|
|
master : https://github.com/LimeSurvey/LimeSurvey/pull/2627 |
|
|
Got lost here. I guess html entities should be encoded on the DB, right? |
|
No… 1st issue : if you import CSV : no filter was done (you can save <script>alert("XSS")</script>, but when you edit you loose all HTML tag. When user register he can add HTML tag, but when edit via GUI : deleted. But Carsten reopen issue because need to allow tag for admin user
|
|
What does it mean to |
|
tag : HTML tag, i don't understand what is your problem here ? Tag :
Yes, but must disallow XSS for simple admin.
We Always ALLOW html tag for question text or help … |
|
https://manual.limesurvey.org/Global_settings/en#Security |
|
But yes : HTML tag allowed … for simple user in token attributes. Tag != XSS I really don't understand here … |
|
|
You are right sorry. <script> tags are filtered! My bad. |
|
|
;) Maybe more clear like this :
|
|
Why disallow HTML for admin ? It's already merged in 3.X … And see : https://github.com/LimeSurvey/LimeSurvey/pull/2627#pullrequestreview-1121944581 for master … |
|
|
And https://github.com/LimeSurvey/LimeSurvey/pull/2627/files#r981147912 |
|
My mistake |
|
Should this also apply for participants added directly to the survey (not through CPDB?) ? |
|
|
Also, when participants are transferred from the CPDB to the survey, the tags are filtered. |
|
I check with remote_co,ntrol : it work without any issue
No : it's OK … See screencast … |
|
|
This is the test case run:
OH, ok. I was testing on the first name and last name as that was on the reproduction steps. |
|
No : original issue was about whole : fitsname/lastname/attrute_X was not filtered when register, but only when edit via GUI. But @c_schmitz reopen the issue to allow superadmin to add tag on attributes : then it's the new PR … |
|
|
OK, I was trying to collaborate with the testing, but not sure I can add a lot more here. Just to clarify, after my testing the participant on the CPDB and the participant on the survey had different first_name and last name. That was not expected (at least not by me :) ). |
|
Clearly another issue … Must chek too if CPDB allow XSS for simple admin. But : clearly : another issue to report … |
|
|
Both PRs were merged now. |
|
|
LimeSurvey: 3.x-LTS c12c9d46 2021-01-13 18:47 Committer: GitHub Details Diff |
Fixed issue 16853: Inconsistent filter behaviour when create token (#1666) Dev: remove flattenText in controller Dev: add some rules, leave LSYii_Validators Dev: use filter_var / FILTER_SANITIZE_STRING for attribute |
Affected Issues 16853 |
|
| mod - application/controllers/admin/tokens.php | Diff File | ||
| mod - application/models/Token.php | Diff File | ||
| mod - application/models/TokenDynamic.php | Diff File | ||
|
LimeSurvey: master af64ca0c 2021-01-14 20:11 Details Diff |
Fixed issue 16853: Inconsistent filter behaviour when create token Fixed issue [security] #16884: LimeSurvey registration emails can be abused (thanks to winfried) Dev: remove flattenText in controller Dev: add some rules, leave LSYii_Validators Dev: use filter_var / FILTER_SANITIZE_STRING for attribute # Conflicts: # application/controllers/admin/tokens.php |
Affected Issues 16853 |
|
| mod - application/controllers/admin/tokens.php | Diff File | ||
| mod - application/models/Token.php | Diff File | ||
| mod - application/models/TokenDynamic.php | Diff File | ||
|
LimeSurvey: master e3c517f6 2021-01-14 20:14 Details Diff |
Fixed issue 16853: Inconsistent filter behaviour when create token Fixed issue [security] #16884: LimeSurvey registration emails can be abused (thanks to winfried) Dev: remove flattenText in controller Dev: add some rules, leave LSYii_Validators Dev: use filter_var / FILTER_SANITIZE_STRING for attribute # Conflicts: # application/controllers/admin/tokens.php # Conflicts: # application/controllers/admin/tokens.php |
Affected Issues 16853 |
|
| mod - application/controllers/admin/tokens.php | Diff File | ||
| mod - application/models/Token.php | Diff File | ||
| mod - application/models/TokenDynamic.php | Diff File | ||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2020-11-23 12:22 | DenisChenu | New Issue | |
| 2020-11-23 12:22 | DenisChenu | File Added: survey_archive_641657.lsa | |
| 2020-11-23 12:22 | DenisChenu | File Added: tokens_641657.csv | |
| 2020-11-23 12:22 | DenisChenu | File Added: Capture d’écran du 2020-11-23 11-58-33.png | |
| 2020-11-23 12:22 | DenisChenu | File Added: Capture d’écran du 2020-11-23 11-58-46.png | |
| 2020-11-23 12:22 | DenisChenu | File Added: Capture d’écran du 2020-11-23 12-22-17.png | |
| 2020-11-23 14:40 | ollehar | Product Version | => 3.25.0 |
| 2020-11-23 14:46 | DenisChenu | Note Added: 60738 | |
| 2020-11-24 18:11 | DenisChenu | Assigned To | => DenisChenu |
| 2020-11-24 18:11 | DenisChenu | Status | new => assigned |
| 2020-11-24 19:17 | DenisChenu | Assigned To | DenisChenu => cdorin |
| 2020-11-24 19:17 | DenisChenu | Status | assigned => ready for testing |
| 2020-11-24 19:17 | DenisChenu | Note Added: 60751 | |
| 2021-01-13 17:47 | DenisChenu | Changeset attached | => LimeSurvey 3.x-LTS c12c9d46 |
| 2021-01-13 17:47 | DenisChenu | Note Added: 61535 | |
| 2021-01-13 17:47 | DenisChenu | Assigned To | cdorin => DenisChenu |
| 2021-01-13 17:47 | DenisChenu | Resolution | open => fixed |
| 2021-01-14 19:11 | DenisChenu | Changeset attached | => LimeSurvey master af64ca0c |
| 2021-01-14 19:11 | DenisChenu | Note Added: 61550 | |
| 2021-01-14 19:15 | DenisChenu | Status | ready for testing => resolved |
| 2021-01-14 19:15 | DenisChenu | Fixed in Version | => 3.25.6 |
| 2021-01-15 19:05 | gabrieljenik | Note Added: 61564 | |
| 2021-01-15 19:05 | gabrieljenik | Note Edited: 61564 | |
| 2021-01-16 10:47 | DenisChenu | Note Added: 61567 | |
| 2021-01-18 11:05 | lime_release_bot | Note Added: 61578 | |
| 2021-01-18 11:05 | lime_release_bot | Status | resolved => closed |
| 2021-01-21 13:36 | DenisChenu | Changeset attached | => LimeSurvey master e3c517f6 |
| 2021-01-21 13:36 | DenisChenu | Note Added: 61624 | |
| 2022-01-19 09:20 | DenisChenu | Relationship added | parent of 17840 |
| 2022-09-21 14:45 | c_schmitz | Note Added: 71868 | |
| 2022-09-21 14:45 | c_schmitz | Bug heat | 6 => 8 |
| 2022-09-21 14:46 | c_schmitz | Status | closed => feedback |
| 2022-09-21 14:46 | c_schmitz | Resolution | fixed => reopened |
| 2022-09-21 14:49 | c_schmitz | Note Edited: 71868 | |
| 2022-09-21 14:49 | c_schmitz | Note Edited: 71868 | |
| 2022-09-21 15:38 | DenisChenu | Note Added: 71869 | |
| 2022-09-21 15:39 | DenisChenu | Note Added: 71870 | |
| 2022-09-21 16:03 | c_schmitz | Note Added: 71871 | |
| 2022-09-21 16:04 | DenisChenu | Note Added: 71872 | |
| 2022-09-21 16:05 | c_schmitz | Priority | none => high |
| 2022-09-21 16:05 | DenisChenu | Note Added: 71873 | |
| 2022-09-21 16:05 | DenisChenu | Note Added: 71874 | |
| 2022-09-21 17:02 | DenisChenu | Assigned To | DenisChenu => c_schmitz |
| 2022-09-21 17:02 | DenisChenu | Note Added: 71876 | |
| 2022-09-21 17:02 | DenisChenu | Status | feedback => assigned |
| 2022-09-21 17:02 | DenisChenu | Status | assigned => ready for code review |
| 2022-10-05 17:19 | gabrieljenik | Note Added: 72125 | |
| 2022-10-06 10:46 | DenisChenu | Note Added: 72141 | |
| 2022-10-12 14:57 | gabrieljenik | Note Added: 72217 | |
| 2022-10-12 15:01 | DenisChenu | Note Added: 72218 | |
| 2022-10-12 15:19 | gabrieljenik | Note Added: 72219 | |
| 2022-10-12 15:27 | DenisChenu | Note Added: 72220 | |
| 2022-10-12 16:12 | gabrieljenik | Note Added: 72221 | |
| 2022-10-12 16:14 | DenisChenu | Note Added: 72222 | |
| 2022-10-12 16:25 | DenisChenu | Note Added: 72224 | |
| 2022-10-12 16:25 | DenisChenu | Note Added: 72225 | |
| 2022-10-12 16:26 | DenisChenu | Assigned To | c_schmitz => gabrieljenik |
| 2022-10-12 16:26 | DenisChenu | Status | ready for code review => ready for testing |
| 2022-10-12 16:30 | gabrieljenik | Note Added: 72226 | |
| 2022-10-21 14:51 | gabrieljenik | Note Added: 72376 | |
| 2022-10-24 22:52 | gabrieljenik | Note Added: 72394 | |
| 2022-10-24 22:52 | gabrieljenik | Assigned To | gabrieljenik => DenisChenu |
| 2022-10-24 22:52 | gabrieljenik | Status | ready for testing => assigned |
| 2022-10-25 12:04 | DenisChenu | Note Added: 72408 | |
| 2022-10-25 12:04 | DenisChenu | File Added: Capture d’écran du 2022-10-25 10-24-29.png | |
| 2022-10-25 12:04 | DenisChenu | Assigned To | DenisChenu => gabrieljenik |
| 2022-10-25 12:04 | DenisChenu | Status | assigned => in testing |
| 2022-10-25 12:05 | DenisChenu | File Deleted: Capture d’écran du 2022-10-25 10-24-29.png | |
| 2022-10-25 12:05 | DenisChenu | Note Added: 72409 | |
| 2022-10-25 12:05 | DenisChenu | File Added: Peek 25-10-2022 12-04.gif | |
| 2022-10-25 14:45 | gabrieljenik | Note Added: 72413 | |
| 2022-10-25 17:55 | DenisChenu | Note Added: 72416 | |
| 2022-10-25 18:04 | gabrieljenik | Note Added: 72417 | |
| 2022-10-25 18:04 | gabrieljenik | Assigned To | gabrieljenik => DenisChenu |
| 2022-10-25 18:05 | DenisChenu | Note Added: 72418 | |
| 2022-10-25 18:10 | DenisChenu | Status | in testing => ready for merge |
| 2022-10-25 18:10 | DenisChenu | Complete LimeSurvey version number (& build) | 3.25.0 git => 5.0.0 |
| 2022-10-26 08:36 | DenisChenu | Assigned To | DenisChenu => |
| 2022-10-26 10:04 | c_schmitz | Assigned To | => c_schmitz |
| 2022-10-26 10:04 | c_schmitz | Status | ready for merge => resolved |
| 2022-10-26 10:04 | c_schmitz | Resolution | reopened => fixed |
| 2022-10-26 10:04 | c_schmitz | Note Added: 72427 | |
| 2023-06-20 17:49 | c_schmitz | Status | resolved => closed |