When using git URLs to reference packages in npm, the URL often gets normalized to a form like:
git+ssh://git@github.com/foo/bar.git#b7e1e0fb20cff47bcca4be90d0c6f83a45e51e9c
When using a URL of this form as a downloadLocation value, it fails validation due to the git@ portion of the URL.
Can the URL regex be expanded to allow for the userinfo portion of the URI?
|
url_pattern = ( |
|
"(http:\\/\\/www\\.|https:\\/\\/www\\.|http:\\/\\/|https:\\/\\/|ssh:\\/\\/|git:\\/\\/|svn:\\/\\/|sftp:" |
|
"\\/\\/|ftp:\\/\\/)?[a-z0-9]+([\\-\\.]{1}[a-z0-9]+){0,100}\\.[a-z]{2,5}(:[0-9]{1,5})?(\\/.*)?" |
When using git URLs to reference packages in npm, the URL often gets normalized to a form like:
When using a URL of this form as a
downloadLocationvalue, it fails validation due to thegit@portion of the URL.Can the URL regex be expanded to allow for the
userinfoportion of the URI?tools-python/src/spdx_tools/spdx/validation/uri_validators.py
Lines 10 to 12 in f15a64f