-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: The ability to whitelist servers from which external scripts are taken using <script> tags. #1074
Comments
Well, that sure is a situation where we should support things, and your solution makes sense, so why not? It is not even technically hard to do. Funnily enough, it mirrors what is in plans for the While such whitelisting is something that can be circumvented if one can use social engineering to modify the whitelist, it is still probably safe and allows us to be, by default safe. We cannot build a system that would be safe from all users that have enough rights. In general, this is what I would expect the world to look like after the prohibition hits:
Case 3.i. above forbids inline code and is not a negotiable one. While in theory, we could allow signed code from whitelisted signatories, in practice, that is overly complicated and will not be feasible when simply opening stuff in an editor may mess up the code and, thus whatever checksum it has. From the administrator's point of view there would then be three new settings:
|
Thanks for the prompt and detailed response Matti, that all sounds very reasonable to me! This gives us some much appreciated certainty. |
We are starting to look towards the future prohibition of <script> tags. Our question bank has several hundred STACK questions that rely on running the line <script src="..."></script> at the beginning of the question text. This is not possible with the proposed prohibition of <script> tags.
The ability for a Moodle site administrator to whitelist <script> tags to a particular server, or folder on a particular server, would solve all of our problems. Can this (or similar) functionality be added before script tags are disabled?
This would satisfy the security goals, as our scripts are stored on our server and modifications on our server are tightly controlled. Uncontrolled external sources would still be prohibited.
Here is one of the scripts that we use: https://apps.canterbury.ac.nz/1/math/online_resources/EMTH119/setup.js. This does the following:
If we are unable to use <script> tags at all, we can only see the following as possible options:
We see the whitelist proposal as a simple solution that still addresses the security concerns. If anyone has any other suggestions we are keen to hear them.
The text was updated successfully, but these errors were encountered: