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

Don't use an empty query string when searching a NuGet v3 repository #3508

Open
6 tasks done
pauby opened this issue Sep 2, 2024 · 0 comments
Open
6 tasks done

Don't use an empty query string when searching a NuGet v3 repository #3508

pauby opened this issue Sep 2, 2024 · 0 comments

Comments

@pauby
Copy link
Member

pauby commented Sep 2, 2024

Checklist

  • I confirm there are no unresolved issues reported on the Chocolatey Status page.
  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.
  • I confirm I am using official, and not unofficial, or modified, Chocolatey products.

What You Are Seeing?

When searching a NuGet v3 endpoints, the Chocolatey CLI query includes an empty query string q=.

What is Expected?

When there is no specific search, the query string should not be included at all. As defined in the NuGet Server API:

Name In Type Required Notes
q URL string no The search terms to used to filter packages

(emphasis mine)

How Did You Get This To Happen?

  1. Add a NuGet v3 source to Chocolatey CLI.
    1. Setup Fiddler to intercept the queries that are made by Chocolatey CLI to the source.
  2. Run a choco search --source <SOURCE SETUP ABOVE>.
  3. Look at the Fiddler traffic to see the queries being made from Chocolatey CLI.

NOTE: This was discovered on a call with @gep13 while looking at #3502 so is from memory. We used Sleet, as per the #3502 issue and saw the queries that were made, within the Sleet interface itself. So we didn't use Fiddler but I am assuming Fiddler will also show you the queries.

System Details

  • Operating System: Windows 10
  • Windows PowerShell version: PowerShell 5.1
  • Chocolatey CLI Version: 2.3.0
  • Chocolatey Licensed Extension version: None
  • Chocolatey License type: None
  • Terminal/Emulator: Windows PowerShell

Installed Packages

N/A

Output Log

N/A (sadly).

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant