-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Issue with special characters in SP credentials in latest version of Az CLI #13625
Comments
Special characters like $ echo "some"password"
> ^C
$ echo 'some'password'
> ^C
$ echo "some!password"
-bash: !password: event not found
$ echo "some$password"
some
Things become worse if the password is not quoted, like
We should not use special characters of Bash in the password. Otherwise customer's script will be broken. Azure Portal uses However,
Even If we use safe characters |
add to S170 |
Describe the bug
When created a new SP (or resetting credentials) n Azure CLI, special characters appear such as !, $, and ' which cause issues with variables/commands in Linux:
Example (obfuscated):
To Reproduce
az ad sp create-for-rbac --skip-assignment
(oraz ad sp credential reset
)Expected behavior
Secret value should contain only character which are permitted and usable in scripts/variables
Environment summary
WSL & Bash/Zsh, Ubuntu VM with Bash
Additional context
Testing a previous version of CLI such as 2.4, we see that secrets are generated as GUID format with only - for special characters. Same case for Azure PowerShell module.
The text was updated successfully, but these errors were encountered: