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

Remove outdated strip-js dependency #2

Merged
merged 8 commits into from Jan 27, 2022
Merged

Remove outdated strip-js dependency #2

merged 8 commits into from Jan 27, 2022

Conversation

dprothero
Copy link
Contributor

@dprothero dprothero commented Jan 27, 2022

The strip-js dependency was used to sanitize the redirect_to query parameter to thwart an XSS attack. It worked, but it is no longer maintained, and it brought along a number of additional dependencies, some of which have documented security vulnerabilities.

The end-goal is to just ensure a valid URL is provided here, so we pass the string to the URL() constructor which will verify it's a valid URL as well as escape anything that might otherwise allow an XSS attack.

Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

  • I acknowledge that all my contributions will be made under the project's license.

@dprothero dprothero merged commit 0b42f9d into main Jan 27, 2022
@dprothero dprothero deleted the replace-strip-js branch January 27, 2022 21:45
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.

None yet

1 participant