View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
16469 | Bug reports | Security | public | 2020-07-08 12:37 | 2020-08-12 17:50 |
Reporter | DenisChenu | Assigned To | DenisChenu | ||
Priority | immediate | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.3.3 | ||||
Summary | 16469: Any admin user can see any question (without read right on survey) | ||||
Description | questionEditor din't check Permission on survey from question, but sid send by url | ||||
Steps To Reproduce |
| ||||
Additional Information | In my opinion : Get qid from url Send a 400 error if there are issue : allow other protection system to do their job (for example fail2ban) | ||||
Tags | No tags attached. | ||||
Bug heat | 258 | ||||
Complete LimeSurvey version number (& build) | 4.3.3 | ||||
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 | ||||
I didn't chek update, but think there are solution |
|
In 3.X … send a 200 white page … (with debug or not) |
|
OK, thanks for testing, Denis. |
|
I'm working on it now! |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30260 |
|
Another solution could be to never send both qid AND sid together. |
|
Think it's the best solution, i already report this issue before 2.6lts |
|
question need onlky qid |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30262 |
|
|
|
Erg sorry … issue is worst i think : there are NO control even in surevyid in url … |
|
Really worst : http://limesurvey.local/master/questionEditor/GetAdvancedOptions?surveyid=713583&gid=296&qid=4917 : no control is done Maybe other … |
|
Then : Issues
We really need a better fix then the current quick fix |
|
Can you link to github instead of your local repo? xD |
|
No : it's sample url :) I can not really link to github , vbecause create a pull request is more quick than link to ght hub …
Maybe best to create a checked on LSBaseController , i do it after fixing TypeHint |
|
401? That's not default behaviour of LS? |
|
Not a 401, a 403 : https://github.com/LimeSurvey/LimeSurvey/blob/9fd5e78aa6a67b1078a05746c29bceb9f8fab7c0/application/core/Survey_Common_Action.php#L193 401 mean : you're not connected , you need to be conneceted to access this link |
|
403 doesn't happy anywhere else in the software. Why change the behaviour here? |
|
403 for all no Permission on survey … Else : show me current way : You mean leave the redirect (302) ? That broke external tool and XHR ? And because : it's always a good idea to respect standard. |
|
Redirect is already done EVERYWHERE in the software, Denis! It should be consistent. |
|
grep -r 'Permission::model' application/controllers/ -A2 | grep redirect | wc 86 redirects after permission check. |
|
Wait, you're talking about the ajax calls? |
|
It's not because old code are broken we need to add old code again and again … I don't care about ajax or not : just send good http header |
|
Well, I care about the software behaving consistently towards the user. :) If you want to change it to 403, make a separate dev issue or feature request. This ticket is about access bugs. |
|
With invalid survey : it's already a 403 in 3.LTS, |
|
Fixed in Release 4.3.4+200713 |
|
GetAdvancedOptions still not protected Strange issue with updating sid (and not gid) : create a question without group ? See screencast |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30352 |
|
Fixed in Release 4.3.9+200806 |
|
LimeSurvey: master ab3562d7 2020-07-08 16:50 Details Diff |
Fixed issue 16469: Any admin user can see any question |
Affected Issues 16469 |
|
mod - application/controllers/QuestionEditorController.php | Diff File | ||
LimeSurvey: master 9fd5e78a 2020-07-09 12:10 Details Diff |
Fixed issue 16469: Any admin user can see any question |
Affected Issues 16469 |
|
mod - application/controllers/QuestionEditorController.php | Diff File | ||
LimeSurvey: master 17f0a0d5 2020-08-06 16:08 Committer: GitHub Details Diff |
Master ls base controller check params (#1479) Fixed issue 16469: Any admin user can see any question (without read right on survey) Fixed issue #16467: Reflected XSS vulnerabilities Dev: add a function to validate int parameters Dev: throw 400/403 or 404 error Dev: remove some uneeded redirect and filter Dev: Move functionnality to an helper function to call Dev : getValidateSurveyId return a validated sid related with qid and gid Dev: rename to getValidatedSurveyId Dev: getQuestionObject must be reviewed : $sureyId must be a mandatory param Dev: more details in function doc and fix partially phpDoc Dev: getValidatedSurveyId get the final sid by param Dev: review test : |
Affected Issues 16469 |
|
mod - application/controllers/LSBaseController.php | Diff File | ||
mod - application/controllers/QuestionEditorController.php | Diff File | ||
mod - tests/functional/backend/AdminViewsTest.php | Diff File | ||
LimeSurvey: master 16425fff 2020-08-12 19:50 Committer: GitHub Details Diff |
Fixed issue 16566: We cannot create multiple choice questions (#1543) Dev: Before issue 16469, QuestionEditorController tried to find the questions using 'findByPk', which automatically casts the value to int. Now, 'find' is used because the survey ID, as the search is done by multiple criterias. Dev: When saving a new question, 'qid' is an empty string, and the resulting SQL fails in Postgres because of the data type. Solved by casting 'qid' to int. Dev: This also helps with issue 16563. Dev: Casting subquestion id as to remove the random characters vue id adds for its view. |
Affected Issues 16469, 16563, 16566 |
|
mod - application/controllers/QuestionEditorController.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-07-08 12:37 | DenisChenu | New Issue | |
2020-07-08 12:37 | DenisChenu | Note Added: 58773 | |
2020-07-08 12:38 | DenisChenu | Steps to Reproduce Updated | |
2020-07-08 12:38 | ollehar | Priority | none => immediate |
2020-07-08 12:38 | ollehar | Severity | minor => crash |
2020-07-08 12:41 | DenisChenu | Note Added: 58774 | |
2020-07-08 13:30 | ollehar | Note Added: 58775 | |
2020-07-08 14:39 | pstelling | Assigned To | => pstelling |
2020-07-08 14:39 | pstelling | Status | new => assigned |
2020-07-08 14:43 | ollehar | Note Added: 58780 | |
2020-07-08 14:52 | ollehar | Changeset attached | => LimeSurvey master ab3562d7 |
2020-07-08 14:52 | ollehar | Note Added: 58781 | |
2020-07-08 14:52 | ollehar | Assigned To | pstelling => ollehar |
2020-07-08 14:52 | ollehar | Resolution | open => fixed |
2020-07-08 14:58 | ollehar | Note Added: 58782 | |
2020-07-08 15:12 | DenisChenu | Note Added: 58784 | |
2020-07-08 15:13 | DenisChenu | Note Added: 58785 | |
2020-07-09 10:10 | pstelling | Changeset attached | => LimeSurvey master 9fd5e78a |
2020-07-09 10:10 | pstelling | Note Added: 58822 | |
2020-07-09 10:10 | pstelling | Assigned To | ollehar => pstelling |
2020-07-09 11:57 | DenisChenu | Note Added: 58824 | |
2020-07-09 12:00 | DenisChenu | Note Added: 58825 | |
2020-07-09 12:10 | DenisChenu | Note Added: 58826 | |
2020-07-09 12:12 | DenisChenu | Note Added: 58827 | |
2020-07-09 12:14 | ollehar | Note Added: 58828 | |
2020-07-09 12:27 | DenisChenu | Note Added: 58832 | |
2020-07-09 12:39 | ollehar | Note Added: 58833 | |
2020-07-09 13:08 | DenisChenu | Note Added: 58836 | |
2020-07-09 13:10 | ollehar | Note Added: 58837 | |
2020-07-09 13:57 | DenisChenu | Note Added: 58841 | |
2020-07-09 14:15 | ollehar | Note Added: 58842 | |
2020-07-09 14:16 | ollehar | Note Added: 58843 | |
2020-07-09 14:30 | ollehar | Note Added: 58844 | |
2020-07-09 14:39 | DenisChenu | Note Added: 58845 | |
2020-07-09 14:43 | ollehar | Note Added: 58847 | |
2020-07-09 15:06 | DenisChenu | Note Added: 58853 | |
2020-07-09 15:12 | DenisChenu | Note Added: 58859 | |
2020-07-13 12:35 | lime_release_bot | Note Added: 58917 | |
2020-07-13 12:35 | lime_release_bot | Status | assigned => closed |
2020-07-13 14:32 | DenisChenu | Status | closed => feedback |
2020-07-13 14:32 | DenisChenu | Resolution | fixed => reopened |
2020-07-13 14:32 | DenisChenu | Note Added: 58921 | |
2020-07-13 14:32 | DenisChenu | Note Added: 58922 | |
2020-07-13 14:32 | DenisChenu | File Added: Peek 13-07-2020 14-32.gif | |
2020-07-13 14:32 | DenisChenu | Status | feedback => assigned |
2020-08-06 14:08 | DenisChenu | Changeset attached | => LimeSurvey master 17f0a0d5 |
2020-08-06 14:08 | DenisChenu | Note Added: 59339 | |
2020-08-06 14:08 | DenisChenu | Assigned To | pstelling => DenisChenu |
2020-08-06 14:08 | DenisChenu | Resolution | reopened => fixed |
2020-08-06 17:32 | lime_release_bot | Note Added: 59346 | |
2020-08-06 17:32 | lime_release_bot | Status | assigned => closed |
2020-08-12 17:50 | gabrieljenik | Changeset attached | => LimeSurvey master 16425fff |