-
Notifications
You must be signed in to change notification settings - Fork 241
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
Enable Content Security Policies #5186
Merged
david-yz-liu
merged 23 commits into
MarkUsProject:master
from
mishaschwartz:enable-basic-csp
Apr 14, 2021
Merged
Enable Content Security Policies #5186
david-yz-liu
merged 23 commits into
MarkUsProject:master
from
mishaschwartz:enable-basic-csp
Apr 14, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mishaschwartz
force-pushed
the
enable-basic-csp
branch
from
March 31, 2021 18:12
d77e1ee
to
518a7b0
Compare
@mishaschwartz I'm testing these changes now, and have encountered 3 issues:
I'll try to do more testing on this today, but wanted to get these to you first! |
@david-yz-liu Amazing! Thanks for finding those |
mishaschwartz
force-pushed
the
enable-basic-csp
branch
from
April 12, 2021 14:17
e90e487
to
d8a6fc7
Compare
mishaschwartz
commented
Apr 12, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Left a few inline comments, and found two other issues;
- Scanned exam issues: I think the CSP is blocking the PDF loading for the "Fix Scans" and "Assign Scans" pages.
- In the codeviewer, there's a dynamically-generated toolbar with buttons for "view plan" and increasing/decreasing font size. The toolbar shows up but the buttons don't work.
app/assets/javascripts/SourceCodeGlower/SyntaxHighlighter1p5Adapter.js
Outdated
Show resolved
Hide resolved
…ct-jsonschema-form
…y hasn't been loaded yet
mishaschwartz
force-pushed
the
enable-basic-csp
branch
from
April 14, 2021 12:28
5066386
to
48eb887
Compare
Merged
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
For security reasons, we should implement some CSP policies. This PR makes a first attempt at that.
Ideally we want to enforce strong policies using nonce keys in all cases. However, we currently depend on at least two javascript libraries (
heic2any
andmathjax
) that require more lax CSP policies.MathJax
at least has indicated that it is unlikely to improve (mathjax/MathJax#1988). Further discussion on the best way forward is needed.TODO: further spot-checks of pages to see if the new CSP rules block things that shouldn't be blocked
Your Changes
Description:
Type of change (select all that apply):
Testing
Questions and Comments (if applicable)
Checklist
Required documentation changes (if applicable)
https://github.com/MarkUsProject/Markus/wiki/Pending-Changes#pr-5186