Skip to content
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

Fix AJAX requests missing CSRF header in Result component #7174

Merged
merged 1 commit into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
- Fix rename confirmation check triggering even upon no rename input (#7124)
- Ensured that the assignment deadline is used as a placeholder if token_end_date is not present. (#7128)
- Fixed grader view rendering when a pre-defined annotation's content is blank (#7147)
- Fixed AJAX requests in grader view, which were missing CSRF token headers (#7174)

### 🔧 Internal changes

Expand Down
4 changes: 4 additions & 0 deletions app/assets/javascripts/Components/Result/result.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React from "react";
import {render} from "react-dom";

// TODO: This import seems to be required to automatically include the X-CSRF-TOKEN header on
// jQuery AJAX requests in this component, unlike all other pages. Requires further investigation.
import "@rails/ujs";

import {LeftPane} from "./left_pane";
import {RightPane} from "./right_pane";
import {SubmissionSelector} from "./submission_selector";
Expand Down