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(dashboard): sanitize href input in text widget #2938

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Conversation

ssjagad
Copy link
Contributor

@ssjagad ssjagad commented Aug 6, 2024

Overview

Validating urls for text widget.

Verifying Changes

Screen.Recording.2024-08-06.at.2.03.45.PM.mov

Test cases used:

javascript:prompt(1)
&#106&#97&#118&#97&#115&#99&#114&#105&#112&#116&#58&#99&#111&#110&#102&#105&#114&#109&#40&#49&#41
\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3aalert(1)
javascript://%0Aalert(1)
javascript://anything%0D%0A%0D%0Awindow.alert(1)

Legal

This project is available under the Apache 2.0 License.

@ssjagad ssjagad marked this pull request as ready for review August 6, 2024 21:04
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add the tests we are using to validate as unit tests?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline. Tests will be done in a separate PR.

@ssjagad ssjagad merged commit f766a3b into main Aug 6, 2024
20 checks passed
@ssjagad ssjagad deleted the santization branch August 6, 2024 22:22
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