maikvandergaag / msft-extensions

Repository for extensions mainly used for Azure DevOps Extensions
https://msftplayground.com
MIT License
126 stars 81 forks source link

Update SQL credentials: sql password character error #483

Open ljansaagbi01 opened 1 year ago

ljansaagbi01 commented 1 year ago

Describe the issue When using the 'Update SQL credentials', having a double quote character (") in the provided sql password leads to an error.

I debugged the powershell code myself and the problem seems to be that the double quote character breaks the 'Apirequestbody' formatting. When the request body is then sent to the API in the update credentials call, there is an error which says that the request body is not formatted correctly.

After changing the sql password to something which didn't include the the double quote character ("), the task would run normally. However, it would be better to include support for a double quote character (") in the password. Or at least add documentation which says that a sql password cannot include this character.

Extension

To Reproduce Steps to reproduce the behavior:

  1. Add the 'Update SQL credentials' task
  2. Fill in a sql password which has a double quote character (")
  3. Run the task
  4. See error

Expected behavior

I expect the credentials to be updated, but they are not.

Situation (please complete the following information):

image

maikvandergaag commented 1 year ago

@ljansaagbi01 will pick this up in a release we are working on.

ljansaagbi01 commented 1 year ago

Nice, thanks! Didn't mention it in my initial post, but great work you are doing with this extension!