Skip to content

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

Open
MAAngamarca wants to merge 1 commit intopearson-release/olive.stagefrom
msa/PADV-729-RCS
Open

feat: regex pattern set for Score (for override only) field#118
MAAngamarca wants to merge 1 commit intopearson-release/olive.stagefrom
msa/PADV-729-RCS

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

@MAAngamarca MAAngamarca requested a review from Squirrel18 March 12, 2024 22:35
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