Skip to content

fix: isExternal check with malformed URL + tests - #1510

Merged
Koooooo-7 merged 2 commits into
developfrom
fix-xss
Feb 18, 2021
Merged

fix: isExternal check with malformed URL + tests#1510
Koooooo-7 merged 2 commits into
developfrom
fix-xss

Conversation

@jhildenbiddle

@jhildenbiddlejhildenbiddle commented Feb 14, 2021

Copy link
Copy Markdown
Member

Fix#1477. Fix#1126. Follow-up to #1489.

Summary

Handles malformed remote URLs that contain more than two forward slashes (e.g., ////////domain.com/file.md)

What kind of change does this PR introduce? (check at least one)

  • Bugfix

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

@vercel

vercelBot commented Feb 14, 2021

Copy link
Copy Markdown

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/fdto751ms
✅ Preview: https://docsify-preview-git-fix-xss.docsify-core.vercel.app

@codesandbox-ci

codesandbox-ciBot commented Feb 14, 2021

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 10d302f:

SandboxSource
docsify-templateConfiguration

@jhildenbiddle

jhildenbiddle commented Feb 14, 2021

Copy link
Copy Markdown
MemberAuthor

Closing #1509 in favor of this PR which 1) fixes the regular expression used in isExternal and 2) includes e2e tests.

@jhildenbiddle
jhildenbiddle requested a review from a teamFebruary 15, 2021 00:07

@Koooooo-7Koooooo-7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

@Koooooo-7
Koooooo-7 requested a review from a teamFebruary 15, 2021 07:02
Sign up for freeto 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.

Security Vulnerability vulnerability report

3 participants

@jhildenbiddle@Koooooo-7@sy-records