Repository navigation
Conversation
Member
Author
|
Note that a somewhat botched approach at this was in #3100. This was also reported in another recent security scan for the grades page. |
The is done for the password change messages on the account settings page, the heading on the user detail page, the hardcopy confirmation for a single user on the hardcopy page, the missing merge data message on the email page, the scoring message on the Grades page, and the scoring file contents displayed on the scoring page. For the grades page the variables in the scoring message are now replaced in a single pass, and each substituted value (user record fields and merge file columns) is HTML escaped. Previously each variable was replaced in a separate pass, so a value containing a variable (for example a first name of "$EMAIL") was itself expanded by a later pass, and values were inserted into the page unescaped. Also, remove the stripping of special characters from the first and last names that come from LTI (for both LTI 1.1 and 1.3). That was done incorrectly (I accidentally used the `e` flag instead of the `g` flag on the regular expression substitution, and so only the first character was actually replaced.), and that is not needed with the other changes in this pull request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
drgrice1
force-pushed
the
html-escape-user-values
branch
from
October 16, 2026 17:32
8cab105 to
fee977b
Compare
This file contains hidden or 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
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.
The is done for the password change messages on the account settings page, the heading on the user detail page, the hardcopy confirmation for a single user on the hardcopy page, the missing merge data message on the email page, the scoring message on the Grades page, and the scoring file contents displayed on the scoring page.
For the grades page the variables in the scoring message are now replaced in a single pass, and each substituted value (user record fields and merge file columns) is HTML escaped. Previously each variable was replaced in a separate pass, so a value containing a variable (for example a first name of "$EMAIL") was itself expanded by a later pass, and values were inserted into the page unescaped.
Also, remove the stripping of special characters from the first and last names that come from LTI (for both LTI 1.1 and 1.3). That was done incorrectly (I accidentally used the
eflag instead of thegflag on the regular expression substitution, and so only the first character was actually replaced.), and that is not needed with the other changes in this pull request.