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

Get-VSTeamVariableGroup doesn't urlencode the group name #517

Closed
sevaa opened this issue Apr 19, 2023 · 1 comment
Closed

Get-VSTeamVariableGroup doesn't urlencode the group name #517

sevaa opened this issue Apr 19, 2023 · 1 comment
Labels
bug when a bug has been identified or filed

Comments

@sevaa
Copy link
Contributor

sevaa commented Apr 19, 2023

Steps to reproduce

Get-VSTeamVariableGroup -Project "MyProject" -Name "a&b"

Expected behavior

I expected that the variable group contents would be returned as a PSObject

Actual behavior?

Three exceptions in a row.

This is a bigger issue than just Get-VSTeamVariableGroup; chances are other cmdlets that take a string parameter that goes directly into the API don't URLEncode them either.

On Which OS have you tried it?

Windows

What was your server version?

Azure DevOps Server 2020

Other server version

No response

Log output of used API

Billing                     :
Build                       : 5.0
Core                        : 5.0
DistributedTask             : 5.0-preview
DistributedTaskReleased     :
ExtensionsManagement        : 5.0-preview
Git                         : 5.0
Graph                       :
HierarchyQuery              : 5.0-preview
MemberEntitlementManagement :
Packaging                   : 5.0-preview
Pipelines                   :
Policy                      : 5.0
Processes                   : 5.0-preview
Release                     : 5.0
ServiceEndpoints            : 5.0-preview
TaskGroups                  : 5.0-preview
Tfvc                        : 5.0
VariableGroups              : 5.0-preview
Version                     : AzD2019
Wiki                        : 5.0
WorkItemTracking            : 5.0

Log output of $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.2673
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.2673
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
@sevaa sevaa added the bug when a bug has been identified or filed label Apr 19, 2023
SebastianSchuetze added a commit that referenced this issue May 20, 2023
Refactor to get rid of crude and incorrect _appendQueryString. Query string parameter values that can potentially be strings should be URLEncoded. Also, _appendQueryString was assuming that the URL already had a query string and produced invalid URLs if the API version was blank.

Fixes #442, #517
---------

Co-authored-by: Seva Alekseyev <[email protected]>
Co-authored-by: Sebastian Schütze <[email protected]>
@mnieto
Copy link
Contributor

mnieto commented May 21, 2023

@sevaa, @SebastianSchuetze this bug is fixed with #523 and can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug when a bug has been identified or filed
Projects
None yet
Development

No branches or pull requests

3 participants