hiera-http icon indicating copy to clipboard operation
hiera-http copied to clipboard

Cannot use paths that require URI escaping after interpolation

Open croddy opened this issue 5 years ago • 0 comments

When the values from interpolated variables require escaping in order to be assembled into valid URIs, it is impossible to use them.

This is due to HI-612: within Hiera itself, the URI must already be valid immediately after variable interpolation, or the lookup will fail long before reaching hiera-http code. I also cannot pre-escape the URI, because hiera-http will later escape it a second time.

I think that the right solution is for Hiera itself to perform URI escaping as I proposed on HI-612, and for hiera-http to remove the escaping that currently happens in http_get.

Currently, the best workaround we have found is to individually pre-escape and reassign variables used for hiera-http paths and to use those instead. However, this also required us to fork hiera-http and remove the escaping in http_get in order to prevent them from being doubly escaped.

croddy avatar Apr 01 '19 20:04 croddy