View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
15690 | Bug reports | Security | public | 2019-12-30 18:40 | 2020-02-03 14:53 |
Reporter | DenisChenu | Assigned To | DenisChenu | ||
Priority | none | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.0.0-RC13 | ||||
Summary | 15690: User with XSS enable can add/update scripts | ||||
Description | User with XSS enable can add script | ||||
Steps To Reproduce | Create an non super admin user, create a survey Try | ||||
Additional Information | This need to be checked This need to be fixed in import, with remote control etc … @cdrorin : after checking : you can assign it to me if this feature is OK too : https://bugs.limesurvey.org/view.php?id=15096#c54731 | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 256 | ||||
Complete LimeSurvey version number (& build) | 4.0.0-RC13 | ||||
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 | ||||
related to | 15096 | closed | DenisChenu | Feature requests | XSS for super-admin too |
related to | 15693 | closed | DenisChenu | Feature requests | Allow simple user to update script with XSS enable |
related to | 15702 | closed | DenisChenu | Bug reports | Script text field should be read-only when user is not allowed to add scripts |
How do I edit question->script? |
|
Found, setting in profile. |
|
Am I supposed to be able to run "alert('XSS')" in the admin interface via the script text field? |
|
This bug report is not idiot safe :( |
|
LimeSurvey dev are not idiot |
|
I've just proven you wrong. XD Why is alert("XSS"); a problem? It's not run anywhere in the admin interface, at least not as I can tell. |
|
Same for Cross-site-scripting in question text : the objective is to disable to add suspicous HTML inside public survey https://manual.limesurvey.org/Optional_settings#Security
If you want to disable XSS in question text => you want to totally disable user to add any script : it's not only my opinion (have client). Even superadmin must not be allowed top add XSS in admin. See https://github.com/LimeSurvey/LimeSurvey/commit/323c6f2f0bfdd6eb1c6fe7dea16b2af503806d2a#diff-813c0e5c1b7f9c5b0239989343f8f282 for example. |
|
OK, thanks for the info. |
|
Fix pushed to branch bug/15690-user-with-xss-filter-enabled-can-add-script. Please review. |
|
because alredy fixed in https://github.com/LimeSurvey/LimeSurvey/pull/1358 |
|
xss filtering must be moved to LSUser because related to user. I prefer usage of beforeSave than a rules. If it's a rules :
|
|
@ollehar : OK for before save ? We can not create a LSYii_NoChangeValidator : because Validator get only : attribute and value but not the model. And we need model. |
|
You can send the model as an argument to the validator. |
|
The validator also has $object, from which you can use get_class(). |
|
Not saying using validator is the best way, just saying it's probably possible. |
|
I create a global solution, working for script but surely for other LSYii_NoUpdateValidator.php |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=29355 |
|
Fixed in Release 4.0.0+200116 |
|
LimeSurvey: master 4774b185 2020-01-10 16:44 Committer: ollehar Details Diff |
Fixed issue 15690: User with XSS enable can add/update scripts (#1364) * Fixed issue 15690: User with XSS enable can add/update scripts |
Affected Issues 15690 |
|
mod - application/controllers/admin/questionedit.php | Diff File | ||
mod - application/core/LSWebUser.php | Diff File | ||
add - application/core/LSYii_NoUpdateValidator.php | Diff File | ||
mod - application/core/LSYii_Validators.php | Diff File | ||
mod - application/models/QuestionL10n.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-12-30 18:40 | DenisChenu | New Issue | |
2019-12-30 18:40 | DenisChenu | Relationship added | related to 15096 |
2020-01-03 15:24 | DenisChenu | Note Added: 55125 | |
2020-01-07 17:29 | DenisChenu | Relationship added | related to 15693 |
2020-01-08 13:26 | ollehar | Note Added: 55150 | |
2020-01-08 13:41 | ollehar | Note Added: 55151 | |
2020-01-08 13:51 | ollehar | Note Added: 55152 | |
2020-01-08 13:52 | ollehar | Note Added: 55153 | |
2020-01-08 14:54 | DenisChenu | File Added: Capture d’écran du 2020-01-08 14-54-18.png | |
2020-01-08 14:54 | DenisChenu | File Added: Capture d’écran du 2020-01-08 14-54-26.png | |
2020-01-08 14:57 | DenisChenu | Note Added: 55156 | |
2020-01-08 14:59 | ollehar | Note Added: 55157 | |
2020-01-08 15:11 | DenisChenu | Note Added: 55158 | |
2020-01-08 15:12 | DenisChenu | Note Edited: 55158 | |
2020-01-08 15:24 | ollehar | Note Added: 55160 | |
2020-01-08 16:45 | ollehar | Note Added: 55163 | |
2020-01-08 16:45 | ollehar | Assigned To | => DenisChenu |
2020-01-08 16:45 | ollehar | Status | new => ready for testing |
2020-01-08 16:46 | ollehar | Note Edited: 55163 | |
2020-01-08 17:33 | DenisChenu | Note Added: 55164 | |
2020-01-08 17:56 | DenisChenu | Note Added: 55165 | |
2020-01-09 17:18 | DenisChenu | Status | ready for testing => assigned |
2020-01-09 17:20 | DenisChenu | Note Added: 55174 | |
2020-01-10 07:59 | DenisChenu | Assigned To | DenisChenu => ollehar |
2020-01-10 07:59 | DenisChenu | Status | assigned => ready for testing |
2020-01-10 07:59 | DenisChenu | Note Added: 55177 | |
2020-01-10 10:30 | ollehar | Note Added: 55180 | |
2020-01-10 10:30 | ollehar | Note Added: 55181 | |
2020-01-10 10:49 | ollehar | Note Added: 55183 | |
2020-01-10 11:44 | DenisChenu | Note Added: 55187 | |
2020-01-10 11:45 | DenisChenu | Note Edited: 55187 | |
2020-01-10 16:20 | DenisChenu | Relationship added | related to 15702 |
2020-01-15 15:37 | ollehar | Changeset attached | => LimeSurvey master 4774b185 |
2020-01-15 15:37 | DenisChenu | Note Added: 55291 | |
2020-01-15 15:37 | DenisChenu | Assigned To | ollehar => DenisChenu |
2020-01-15 15:37 | DenisChenu | Resolution | open => fixed |
2020-02-03 14:53 | lime_release_bot | Note Added: 55647 | |
2020-02-03 14:53 | lime_release_bot | Status | ready for testing => closed |