Do not allow http schema in repository URLs
toras9000 opened this issue · comments
Describe the bug
When a package is uploaded, if the repository URL in the package information is http, the URL is not accepted.
Specifically, it is the URL indicated by the repository element of nuspec.
If you upload a package whose repository URL is htttp, the upload itself will succeed.
However, the Source code
link that appears on the package page after upload is not the package's configuration, but the URL of the page itself.
I think this is due to the fact that the following code section compares only with Uri.UriSchemeHttps.
To Reproduce
- The target Bagetter version is v1.4.2.
- Create a package whose repository element is http.
- Perform a
nuget push
to Bagetter. - Open the uploaded package page in browser.
- The
Source code
link is not appropriate.
- The
Expected behavior
Even if the repository URL is http, it will be properly linked.
I rely on translation tools. I'm sorry if there is a strange sentence.
You're right, since BaGetter is being used internally too, there can be repositories hosted without https still. I don't have time for it right now, but I will review PRs or do it once I have some more time.