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

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

Open
4 of 7 tasks
dw-alexangas opened this issue Dec 20, 2024 · 0 comments
Open
4 of 7 tasks

Comments

@dw-alexangas
Copy link

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;'"
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