Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3k forks source link

"az keyvault secret set" have many parsing errors #17512

Open ipg-informatik opened 3 years ago

ipg-informatik commented 3 years ago

Description

"az keyvault secret set" have many parsing errors, when a value have special characters. For example the command have problem with ")", ">", "&" and ...?

Example Command: az keyvault secret set --name test --value ')aaa@aa>:{&aaa'

To Reproduce:

Simply try to add a secret with some special character from above.

Workaround

You can put every special character in quotation marks ("), but no idea how many characters are affected.

Example Workaround: az keyvault secret set --name test --value '")"aaa@aa">":{"&"aaa'

Environment Summary

Windows-10-10.0.18362-SP0
Python 3.6.8
Installer: MSI

azure-cli 2.19.1 *

Extensions:
aks-preview 0.5.6
alertsmanagement 0.1.0
yungezz commented 3 years ago

add @houk-ms to have a look

ipg-informatik commented 3 years ago

Any update?

maramazza commented 3 weeks ago

Any news? There is the same error if you try to retrieve the value of the secret if inside the secret name there is "special characters" like "_"

az keyvault secret show --name "test_test" --vault-name xxxxxxxxx --query value (BadParameter) The request URI contains an invalid name: test_test Code: BadParameter Message: The request URI contains an invalid name: test_test