Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix file protocol spoofing
fix file protocol spoofing
  • Loading branch information
vovikhangcdv committed Jun 30, 2022
1 parent 64bedf6 commit 3c169ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Expand Up @@ -37,7 +37,7 @@ const parsePath = require("parse-path")
const parseUrl = (url, normalize = false) => {

// Constants
const GIT_RE = /((git@|http(s)?:\/\/)([\w\.@]+)(\/|:))(([\~,\w,\-,\_,\/]+)(.git){0,1}((\/){0,1}))/
const GIT_RE = /(^(git@|http(s)?:\/\/)([\w\.@]+)(\/|:))(([\~,\w,\-,\_,\/]+)(.git){0,1}((\/){0,1}))/

if (typeof url !== "string" || !url.trim()) {
const err = new Error("Invalid url.")
Expand Down

0 comments on commit 3c169ee

Please sign in to comment.