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

fix: XSS injection with Querybook RichTextEditor #1412

Merged
merged 1 commit into from
Feb 21, 2024
Merged

Conversation

czgu
Copy link
Collaborator

@czgu czgu commented Feb 21, 2024

Currently, if a user inputs a javascript:alert() into the URL, it would XSS inject any users on that doc who clicks the link. This fix is backward compatible where all non-http/https urls will cease to work.

Previous Behavior

  1. Create a new DataDoc
  2. Create a text cell and enter text "foo"
  3. Select the text and assign URL "javascript:alert()"
  4. Click on the URL and notice the alert is triggered.

Current Behavior
Step 1-3: same as above
4. When clicking on the URL, a blank page will be opened.

@czgu czgu merged commit bc620da into pinterest:master Feb 21, 2024
3 checks passed
@czgu czgu deleted the secfix branch February 21, 2024 21:27
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.

2 participants