[
https://issues.apache.org/jira/browse/KNOX-518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14519578#comment-14519578
]
Larry McCay commented on KNOX-518:
----------------------------------
I've committed this.
Thank you for your contribution, [~kristopherkane]!
> knoxcli documentation to handle special characters in passwords when passed
> with --value
> ----------------------------------------------------------------------------------------
>
> Key: KNOX-518
> URL: https://issues.apache.org/jira/browse/KNOX-518
> Project: Apache Knox
> Issue Type: Improvement
> Components: KnoxCLI
> Affects Versions: 0.5.0, 0.6.0
> Environment: RHEL 6, Oracle Java 1.7
> Reporter: Kristopher Kane
> Assignee: Kristopher Kane
> Labels: documentation
> Fix For: 0.6.0
>
> Attachments: KNOX-518.patch
>
>
> Documentation update to help explain the following
> When using '--value' to specify a password for create-alias, characters
> outside of [a-z][A-Z][0-9] need to be single quoted or escaped. Double
> quotes are used for weak escaping where meta-characters like '$' will be
> expanded as variables.
> Here are some results. I've added an echo statement to the knoxcli.sh to
> print what it receives from the arguments.
> Double quotes results in meta-character expansion
> [knox@host bin]$ ./knoxcli.sh create-alias gateway-identity-passphrase-test-3
> --value "asdf$jkl;"
> create-alias gateway-identity-passphrase-test-3 --value asdf;
> gateway-identity-passphrase-test-3 has been successfully created.
> Single quote results in a correct password:
> [knox@host bin]$ ./knoxcli.sh create-alias gateway-identity-passphrase-test-3
> --value 'asdf$jkl;'
> -echo statement from knoxcli - create-alias
> gateway-identity-passphrase-test-3 --value asdf$jkl;
> gateway-identity-passphrase-test-3 has been successfully created.
> Per character escaping results in correct password
> [knox@host bin]$ ./knoxcli.sh create-alias gateway-identity-passphrase-test-3
> --value asdf\$jkl\;
> -echo statement from knoxcli - create-alias
> gateway-identity-passphrase-test-3 --value asdf$jkl;
> gateway-identity-passphrase-test-3 has been successfully created.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)