Skip to content

Escape feedback in hidden input of locked or overridden grades - #166

Merged
adrian-sarmas merged 1 commit into
elearningsoftware:masterfrom
bycs-lp:MBS-11468_Escape_Locked_Feedback_Hidden_Input
Oct 20, 2026
Merged

adrian-sarmas merged 1 commit into
elearningsoftware:masterfrom
bycs-lp:MBS-11468_Escape_Locked_Feedback_Hidden_Input

Conversation

@PM84

@PM84 PM84 commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

This issue was identified during a penetration test. When a grade is locked or overridden in the gradebook, the feedback was concatenated unescaped into the value attribute of a hidden input on the report page, allowing attribute injection; this change renders the input with html_writer::empty_tag() and adds unit tests.

adrian-sarmas added a commit that referenced this pull request Oct 20, 2026
The Atto editor, the default before Moodle 4.2, reads $PAGE->url when
initialising, which triggered an unexpected debugging() call and failed
the tests added in #166 on Moodle 4.0 and 4.1.
@adrian-sarmas
adrian-sarmas merged commit 9052b0a into elearningsoftware:master Oct 20, 2026
44 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants