Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exempt files#show_relative from protect_from_forgery
Rails 4.1 introduces CSRF protection from remote <script> tags. This prevents locally-stored JavaScript files uploaded as part of a brand config from loading. This change enforces CSRF protection for non-Account-context files, but allows Account-context files to be downloaded. Test plan: 1. Create a new brand config. 2. Add a JS file to the brand config. 3. Save and apply the brand config. 4. The JS file should load and execute on page-load, and should not be blocked by CSRF. closes CORE-844 closes GH-945 Change-Id: Id59c139a379b286af610947824fedad63b6b7113 Reviewed-on: https://gerrit.instructure.com/137416 Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com> Tested-by: Jenkins QA-Review: Tucker McKnight <tmcknight@instructure.com> Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
- Loading branch information
1 parent
ac046a8
commit c18b389
Showing
3 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log('This is totally not a malicious JavaScript file.') |