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

feat: regex pattern set for Score (for override only) field #118

Open
wants to merge 1 commit into
base: pearson-release/olive.stage
Choose a base branch
from

Conversation

MAAngamarca
Copy link

Description

This PR includes a fix to prevent Reflected Cross-Site Scripting on Score (for override only) field. This attack is visible in the following image:
image

Changes

  • Changes input type to number to filter only numbers.
  • Adds a sanitize function to remove extra characters on the score variable.

How to test:

In devstack:

  • Get the devstack up and running from this branch
  • On a Blank Common Problem and with a staff user, click on STAFF DEBUG INFO

image

  • In Score (for override only) field, paste this code: <script>alert('yes')</script>, click on Override Score button and no alert should be displayed.
    image

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.

1 participant