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

HTML sanitizer bypass #388

Closed
shhnjk opened this issue Mar 5, 2020 · 0 comments
Closed

HTML sanitizer bypass #388

shhnjk opened this issue Mar 5, 2020 · 0 comments

Comments

@shhnjk
Copy link

shhnjk commented Mar 5, 2020

Describe the bug
HTML sanitizer in RoosterJS can be bypassed.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://microsoft.github.io/roosterjs/index.html
  2. Click on show side pane
  3. Click on API Playground
  4. Select HTML sanitizer
  5. Add following to the input
<a href="javascript
:alert(1)">test</a>
  1. Click on Sanitize button
  2. JavaScript URL is still there

Expected behavior
Empty anchor tag

Device Information

  • OS: Windows 10
  • Browser: Chrome
  • Version: 80
@shhnjk shhnjk changed the title XSS in sample site HTML sanitizer bypass Mar 5, 2020
JiuqingSong added a commit that referenced this issue Mar 10, 2020
@JiuqingSong JiuqingSong reopened this Mar 11, 2020
JiuqingSong added a commit that referenced this issue Mar 11, 2020
JiuqingSong added a commit that referenced this issue Mar 12, 2020
* Fix #388 (2nd try)

* add test case

* 7.0.6: Support types in roosterjs-cross-window

* auto generate TargetWIndow type

* export TargetWindow
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

No branches or pull requests

2 participants