Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not allow http schema in repository URLs #151

Closed
toras9000 opened this issue Jun 10, 2024 · 2 comments · Fixed by #171
Closed

Do not allow http schema in repository URLs #151

toras9000 opened this issue Jun 10, 2024 · 2 comments · Fixed by #171
Labels
bug Something isn't working

Comments

@toras9000
Copy link

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.

if (repositoryUri.Scheme != Uri.UriSchemeHttps)

To Reproduce

  1. The target Bagetter version is v1.4.2.
  2. Create a package whose repository element is http.
  3. Perform a nuget push to Bagetter.
  4. Open the uploaded package page in browser.
    • The Source code link is not appropriate.

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.

@Regenhardt
Copy link

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.

@Regenhardt Regenhardt added the bug Something isn't working label Jun 19, 2024
seriouz added a commit to seriouz/BaGetter that referenced this issue Aug 7, 2024
@seriouz
Copy link

seriouz commented Aug 7, 2024

I added and tested the proposed solution and its working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants