Azure / azure-devops-cli-extension

Azure DevOps Extension for Azure CLI
https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/?view=azure-cli-latest
MIT License
628 stars 241 forks source link

az repos pr list : invalid json output produced when non-usual unicode characters are present in title or description #1305

Open MichalKupczyk opened 1 year ago

MichalKupczyk commented 1 year ago

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az repos pr list Extension Name: azure-devops. Version: 0.25.0.

Errors:

If the Pull request's Title or Description (and possibly other elements) contain non-ascii characters (in this case unicode 0x96) , these are outputted 'as-is', instead of being properly serialized into two bytes. Because of that the file fails to conform to standard, and is therefore invalid.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

The produced json file should encode the 0x96 character in UTF8 as two bytes: 0xC2 0x96 .

Environment Summary

Windows-10-10.0.19044-SP0
Python 3.10.5
Installer: MSI

azure-cli 2.41.0

Extensions:
azure-devops 0.25.0

Dependencies:
msal 1.20.0b1
azure-mgmt-resource 21.1.0b1

Additional Context