Skip to content

[BUG]: AzureRmWebAppDeployment@4: Comma in setParam argument causes incorrect encoding #20743

Open
@dw-alexangas

Description

@dw-alexangas

New issue checklist

Task name

AzureRmWebAppDeployment

Task version

4.247.1

Issue Description

After experiencing the AzureRmWebAppDeployment@4 task being broken at least twice, we decided to lock it in our YAML pipelines to version 4.225.1. Due to the Node 10 deprecation warning, we are now attempting to update to the latest version.

We have found that when using the AdditionalArguments parameter and supplying MSDeploy arguments of form -setParam:name='X',value='Y' we are experiencing a bug. This appears to be logic that was introduced in 88ec513 related to encoding.

The change in behaviour has connection strings that were previously correctly encoded as:

Encrypt=True;TrustServerCertificate=False;Data Source=some-sql-server.database.windows.net,1433;Initial Catalog=some-database;User Id=someuser;Password=somepassword;

To now be incorrectly encoded as:

'Encrypt=True;TrustServerCertificate=False;Data Source=some-sql-server.database.windows.net",1433;Initial Catalog="some-database;User Id=someuser;Password=somepassword;'

Please note the following breaking changes:

  1. Invalid insertions of "
  2. Invalid prefix and suffix of single quote marks

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

windows-2022

Relevant log output

There is no error, the behaviour is incorrect.

Full task logs with system.debug enabled

N/A

Repro steps

- task: [email protected]	# TO REPRO: Remove specific minor/patch version
    inputs:
      azureSubscription: $(AzureSubscription)
      WebAppName: '$(WebAppName)'
      ResourceGroupName: '$(ResourceGroupName)'
      packageForLinux: '$(SourcePath)/$(PackageFilename)'
      enableCustomDeployment: true
      TakeAppOfflineFlag: false
      ExcludeFilesFromAppDataFlag: false
      RenameFilesFlag: false
      AdditionalArguments: "-retryAttempts:6 -retryInterval:10000 -setParam:name='ConnectionString',value='Encrypt=True;TrustServerCertificate=False;Data Source=some-sql-server.database.windows.net,1433;Initial Catalog=some-database;User Id=someuser;Password=somepassword;'"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions