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

Solve some XSS attack bypass scenarios #246

Merged
merged 1 commit into from
Feb 25, 2024
Merged

Conversation

qhxin
Copy link
Contributor

@qhxin qhxin commented Feb 21, 2024

Solve some XSS attack bypass scenarios

Pull Request Template

Description

Fixes # XSS attack

If you use getHTML, some specific attack tags will not be processed because the execution precondition of escapeHtml is that the variable exists “<>” at the same time.

The following tags will not be escaped and the attack script will be executed:
<img src=x onxss="" onerror="alert(document.cookie);"

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Run unit test.

  • Add Test Case: None

Solve some XSS attack bypass scenarios
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@cwtuan cwtuan merged commit 6cf703c into alibaba:master Feb 25, 2024
1 check was pending
@cwtuan
Copy link
Collaborator

cwtuan commented Feb 25, 2024

Thanks for your awesome work! This PR is done.
Version: react-intl-universal@2.11.1

@cwtuan cwtuan changed the title Update ReactIntlUniversal.js Solve some XSS attack bypass scenarios Feb 25, 2024
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.

3 participants