spring-cloud / spring-cloud-cli

Spring Cloud CLI features
Apache License 2.0
155 stars 80 forks source link

Spring Cloud Encrypt/Decrypt exhibits unwanted behavior when args contain '!' and are not enclosed in single quotes #170

Open sweller999 opened 3 years ago

sweller999 commented 3 years ago

Bug report

Environment: spring-cloud-version (Initially had Spring Cloud CLI version 2.2.3.RELEASE installed and downgraded to 2.2.0.RELEASE while troubleshooting this error)

When attempting to encrypt some keys with spring encrypt, I noticed that the encrypt command fails when there is a single '!' character in any of the arguments, and when one contains '!!' it will append previous command line arguments into the argument before encrypting. This can be avoided by enclosing all arguments in single quotes- double quotes will not work however. Since the spring cloud cli documentation does not mention this behavior, I suggest updating it to include single quotes around the example key and value arguments

Behavior: spring-cloud-screenshot

Relevant Documentation: Screen Shot 2020-12-16 at 5 06 45 PM