Allow unescaped opening delimiters
SimonBarendse opened this issue · 1 comments
In #103 (comment) @mackenbach suggested to accept this template input {{{ path/to/secret }}}
and render it as follows: {secret value}
.
Currently this returns an error, as the first two brackets ({{
) open the secret tag and so the third bracket is invalid, as a bracket is not an allowed character in a secret path. To get the {secret value}
output, you'd have to use \{{{ path/to/secret }}}
.
As occurrences of {{
and ${
are rare, for now we'll keep the current behavior of having to escape those. This has the advantage that it is easier to spot a mistake where you accidentally type one to many {. Now an error is returned in this case. With the proposed behavior, that would result in an extra
{` being passed with the secret, probably resulting in the secret being rejected as a valid password/token etc. This would be harder to debug.
We'll re-open the ticket when it turns out the use of {{
or ${
is common and it is bothersome to escape them everywhere. Feel free to respond with a use-case if you run into this.