hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denalex <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: HAWQ-717: Use password as fed by the ...
Date Thu, 05 May 2016 17:57:46 GMT
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 ? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message