esapi-java-legacy
esapi-java-legacy copied to clipboard
EncryptedPropertiesUtils Switch for Adding Values
From [email protected] on September 09, 2014 11:18:01
EncryptedPropertiesUtils may be used to encrypt a properties file but cannot be used in an automated fashion because it prompts for additional key-values pairs. Attached is a patch that disables prompting for additional key-values pairs by default and provides a command line switch, --add-values, for enabling user input to add additional values.
Attachment: EncryptedPropertiesUtils --add-values switch.patch
Original issue: http://code.google.com/p/owasp-esapi-java/issues/detail?id=336
This attached patch (which I had previously rescued from Google Code) adds an additional command like switch that pretty much seems to do same as the default (reads a key, and a value) until EOF is reached, but the only difference is that it doesn't prompt for more input which seems to be what the entire complaint is about. I imagine this is because the person originally reporting the issue wishes to be able to use this a a filter as in a pipeline, etc.
Perhaps it would make more sense here to just make the use the create a '--silence-prompts' flag which if set to true, would disable the prompts? That seems to be a bit more straight forward and more toward the intended purpose.