Skip to content

Validate external URLs are http(s) before opening externally#150

Merged
sergeichestakov merged 1 commit intomainfrom
@sergeichestakov/validate-protocol-handlers
Feb 6, 2024
Merged

Validate external URLs are http(s) before opening externally#150
sergeichestakov merged 1 commit intomainfrom
@sergeichestakov/validate-protocol-handlers

Conversation

@sergeichestakov
Copy link
Copy Markdown
Contributor

Why

See H1 Report. We should validate that any externally opened URLs are http/https since otherwise a malicious or malformed URL could open another app on the users machine with that protocol registered which may cause unwanted code to be executed.

Fixes WS-2623

What changed

Validate external URLs are http(s) before opening externally

Test plan

  • Try to open a non http url from the devtools in the app
  • Fails to open
  • Open an https URL from the devtools or click a link to e.g. our docs in the app
  • Still opens

@sergeichestakov sergeichestakov self-assigned this Feb 6, 2024
@linear
Copy link
Copy Markdown

linear bot commented Feb 6, 2024

WS-2623 Validate URLs before opening

See Hacker One report and relevant guide.

We should not open links that are not https and should add some extra validation here on the protocol handler side.

@sergeichestakov sergeichestakov requested review from a team, Monkatraz and szymonkaliski and removed request for a team February 6, 2024 15:20
@sergeichestakov sergeichestakov changed the title Validatge external URLs are http(s) before opening externally Validate external URLs are http(s) before opening externally Feb 6, 2024
Copy link
Copy Markdown
Contributor

@szymonkaliski szymonkaliski left a comment

Choose a reason for hiding this comment

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

🔒

@sergeichestakov sergeichestakov merged commit 30cf922 into main Feb 6, 2024
@sergeichestakov sergeichestakov deleted the @sergeichestakov/validate-protocol-handlers branch February 6, 2024 15:33
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