microsoft / microsoft/winget-cli

Should encode package identifier and package version before making api request

Open
#2,667 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

I built a winget private feed using Asp.net with SQL Server, yes it worked very well. Issue happened when devops team try to prevent special character from url, for example, plus character (+), then winget install command will face error 404 (cannot pass network layer)

What I can suggest is to use encode url for packageIdentifier and packageVersion before making any request, I highly believe it works, this part will not affect the winget-cli project as well!

Let me hear your opinion!

Steps to reproduce
  1. Add Notepad++.Notepad++ to the winget private feed
  2. Prevent plus character from network layer (in my case I use portal azure, app service)
  3. use winget install notepad++ --source myPrivateFeed
Expected behavior

the command work installing "notepad++ " package

Actual behavior

Not found url (404)

Environment
Windows Package Manager v1.3.2691
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19044.2006
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.18.2691.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the private-feed installation using a package identifier or version containing a plus character and observe the 404 request. Then trace where the CLI builds requests for packageIdentifier and packageVersion; done means the encoded request succeeds without breaking normal package installation. No source file or test location is identified in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.