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: only allow http(s) urls in link buttons #508

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Conversation

stephancill
Copy link
Contributor

Change Summary

Merge Checklist

  • PR has a Changeset
  • PR includes documentation if necessary
  • PR updates the boilerplates if necessary

Copy link

vercel bot commented Oct 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frames-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 15, 2024 9:42am
framesjs-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 15, 2024 9:42am
framesjs-examples ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 15, 2024 9:42am

Comment on lines 381 to 387
const locationUrl = new URL(frameButton.target);

// Reject non-http(s) URLs
if (
locationUrl.protocol !== "http:" &&
locationUrl.protocol !== "https:"
) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we extract this to some sort of isLinkTargetValid() or something like that?

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