Skip to content
New issue

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

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

Already on GitHub? # to your account

[NuGet.org Bug]: Deprecation API is case sensitive on package version #10242

Open
joelverhagen opened this issue Oct 30, 2024 · 2 comments · Fixed by #10243
Open

[NuGet.org Bug]: Deprecation API is case sensitive on package version #10242

joelverhagen opened this issue Oct 30, 2024 · 2 comments · Fixed by #10243
Assignees
Labels

Comments

@joelverhagen
Copy link
Member

joelverhagen commented Oct 30, 2024

Impact

I'm unable to use NuGet.org

Describe the bug

This was found when helping the Azure SDK team with a bug.

If the version included in the deprecation API request does not match the original version casing (e.g. 2.6.0-rc1 instead of 2.6.0-RC1) the request fails with a 404.

Repro Steps

  1. Upload a package with version 2.6.0-RC1 version
  2. Deprecate it via API using this request body:
{
  "versions": [
    "2.6.0-rc1"
  ],
  "isLegacy": "true"
}

Expected Behavior

This should succeed. Instead it returns 404.

PUT /api/v2/package/MyPackage/deprecations HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 27
Content-Type: application/json
Host: localhost
User-Agent: HTTPie/3.2.3
X-NuGet-ApiKey: API_KEY

{
    "versions": [
        "2.6.0-rc1"
    ]
}


HTTP/1.1 404 At least one version of package 'MyPackage' specified could not be found.
Cache-Control: private, s-maxage=0
Content-Length: 90
Content-Security-Policy: frame-ancestors 'none'
Content-Type: text/html; charset=utf-8
Date: Wed, 30 Oct 2024 13:35:00 GMT
Server: Microsoft-IIS/10.0
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-XSS-Protection: 1; mode=block

At least one version of package 'MyPackage' specified could not be found.

Screenshots

No response

Additional Context and logs

No response

@erdembayar
Copy link
Contributor

erdembayar commented Nov 11, 2024

@joelverhagen

Should we close this issue considering PR is merged?

@joelverhagen
Copy link
Member Author

It hasn't deployed yet. I remember our process being to only close issues after they are verified in PROD.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants