From 8881feb54ae5932d17d34d0e10e861ef7b2d9755 Mon Sep 17 00:00:00 2001 From: Jiyeong Seok <50347670+dd-jy@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:29:15 +0900 Subject: [PATCH] Fix the vulnerability (#133) * Fix the vulnerability Signed-off-by: Jiyeong Seok * Fix the vulnerability Signed-off-by: Jiyeong Seok --------- Signed-off-by: Jiyeong Seok --- src/fosslight_util/_get_downloadable_url.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fosslight_util/_get_downloadable_url.py b/src/fosslight_util/_get_downloadable_url.py index 5979120..30d8d8a 100755 --- a/src/fosslight_util/_get_downloadable_url.py +++ b/src/fosslight_util/_get_downloadable_url.py @@ -24,7 +24,7 @@ def get_downloadable_url(link): ret, new_link = get_download_location_for_pypi(link) elif link.startswith('mvnrepository.com/artifact/') or link.startswith('repo1.maven.org/'): ret, new_link = get_download_location_for_maven(link) - elif link.startswith('www.npmjs.com/') or link.startswith('registry.npmjs.org'): + elif link.startswith('www.npmjs.com/') or link.startswith('registry.npmjs.org/'): ret, new_link = get_download_location_for_npm(link) elif link.startswith('pub.dev/'): ret, new_link = get_download_location_for_pub(link) @@ -118,7 +118,7 @@ def get_download_location_for_npm(link): oss_name_npm = "" tar_name = "" - if link.startswith('www.npmjs.com/') or link.startswith('registry.npmjs.org'): + if link.startswith('www.npmjs.com/') or link.startswith('registry.npmjs.org/'): try: dn_loc_split = link.split('/') if dn_loc_split[1] == 'package':