[ 
https://issues.apache.org/jira/browse/HAWQ-717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15272729#comment-15272729
 ] 

ASF GitHub Bot commented on HAWQ-717:
-------------------------------------

Github user denalex commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/637#discussion_r62226354
  
    --- Diff: tools/bin/hawq ---
    @@ -82,7 +83,13 @@ def main():
         if len(sys.argv) > 2:
             hawq_command = sys.argv[1]
             second_arg = sys.argv[2]
    -        sub_args = " ".join(sys.argv[2:])
    +        sub_args_list = sys.argv[2:]
    +        # Password can have special characters like semicolon (;), 
quotes(", ') etc, convert input password to a string
    +        if hawq_command == 'ssh-exkeys' and '-p' in sub_args_list:
    +            password_index = sub_args_list.index('-p') + 1
    +            if len(sub_args_list) > password_index:
    +              sub_arg_list[password_index] = 
json.dumps(sub_args_list[password_index])
    --- End diff --
    
    a bit cautious about using json here. Tried this from python shell:
    >>> json.dumps('foo zzz')
    '"foo zzz"'
    So it seems the call preserved single quotes but also added double quotes 
inside the value, which would essentially change the password, no ? 


> HAWQ hawq ssh-exkeys command should consider the string exactly as its given 
> at the command line prompt
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HAWQ-717
>                 URL: https://issues.apache.org/jira/browse/HAWQ-717
>             Project: Apache HAWQ
>          Issue Type: Bug
>            Reporter: bhuvnesh chaudhary
>            Assignee: Lei Chang
>
> HAWQ hawq ssh-exkeys command should consider the string exactly as its given 
> at the command line prompt.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to