Skip to content

Commit

Permalink
fix(snyk): replace encodeURIComponent with encodeURI for Snyk URLs (#173
Browse files Browse the repository at this point in the history
)

fix #172
  • Loading branch information
xiniria committed Nov 25, 2020
1 parent 132d4fd commit 148bf57
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/marshalls/snyk.marshall.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ class Marshall extends BaseMarshall {
}

getSnykVulnInfoUnauthenticated ({ packageName, packageVersion }) {
const url = `${SNYK_TEST_URL}/${encodeURIComponent(
packageName
)}/${encodeURIComponent(packageVersion)}?type=json`
const url = encodeURI(`${SNYK_TEST_URL}/${packageName}/${packageVersion}?type=json`)

return axios
.get(url)
Expand All @@ -85,9 +83,7 @@ class Marshall extends BaseMarshall {
return this.getSnykVulnInfoUnauthenticated({ packageName, packageVersion })
}

const url = `${SNYK_API_URL}/${encodeURIComponent(
packageName
)}/${encodeURIComponent(packageVersion)}`
const url = encodeURI(`${SNYK_API_URL}/${packageName}/${packageVersion}`)

return axios
.get(url, {
Expand Down

0 comments on commit 148bf57

Please sign in to comment.