brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <...@git.apache.org>
Subject [GitHub] brooklyn-server issue #554: Ensured the \n character is escaped when escapin...
Date Thu, 09 Feb 2017 15:38:15 GMT
Github user neykov commented on the issue:

    https://github.com/apache/brooklyn-server/pull/554
  
    @Graeme-Miller That's one of the scenarios where adding a new line will lead to unexpected
results.
    doing
    ```
    export BROOKLYN_CFG_ADDITIONS="brooklyn.location.jclouds.aws-ec2.identity = test_ident\nbrooklyn.location.jclouds.aws-ec2.credential
= test_key"
    echo $BROOKLYN_CFG_ADDITIONS
    ```
    
    results in
    
    ```
    brooklyn.location.jclouds.aws-ec2.identity = test_ident\nbrooklyn.location.jclouds.aws-ec2.credential
= test_key
    ```
    
    So same thing repeated verbatim.
    
    It's possible to get a new line out of it by using `printf "BROOKLYN_CFG_ADDITIONS"`.
    
    Wonder which one is better - failing early (when trying to serialise) or escaping the
new line. Current behaviour is worst - could easily be exploited. Given this I'm inclined
to merge the PR and then discuss improvements.



---
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