Conversation
This does the things that I asked @drdrew42 to address in openwebwork#1392. Since @drdrew42 seems to not have time to deal with that (due to the lack of response to my comments) I am opening this pull request. This also addresses the fourth security vulnerability that @drdrew42 mentioned in the Slack securityresponseteam channel. Basically, it only allows symlinks to be created to a file that is in the `$WeBWorK::PG::IO::pg_envir->{directories}{permitted_read_dir}`. That does allow following symlinks, so for webwork2 that includes anything in or linked to in the course directory. That means OPL static image files will work, or files in the `webwork2/assets/pg/Student_Orientation` directory (for example). One case that was allowed before that this doesn't allow is a file in the `webwork2/htdocs/images` directory. I don't really see a need to allow those files though. For the standalone renderer that is the root directory of the standalone renderer app (by default). This could be considered for a hotfix as @drdrew42 mentioned in openwebwork#1392.
|
A hotfix is probably a good idea. I would say add a PR for that so we can approve/merge both at once. Do you have any test problems to illustrate what is being hardened? |
|
@drdrew42 posted four problems that cover the cases in the |
|
I posted the problems in the |
This does the things that I asked @drdrew42 to address in #1392. Since @drdrew42 seems to not have time to deal with that (due to the lack of response to my comments) I am opening this pull request.
This also addresses the fourth security vulnerability that @drdrew42 mentioned in the Slack securityresponseteam channel. Basically, it only allows symlinks to be created to a file that is in the
$WeBWorK::PG::IO::pg_envir->{directories}{permitted_read_dir}.That does allow following symlinks, so for webwork2 that includes anything in or linked to in the course directory. That means OPL static image files will work, or files in the
webwork2/assets/pg/Student_Orientationdirectory (for example). One case that was allowed before that this doesn't allow is a file in thewebwork2/htdocs/imagesdirectory. I don't really see a need to allow those files though.For the standalone renderer that is the root directory of the standalone renderer app (by default).
This could be considered for a hotfix as @drdrew42 mentioned in #1392.