Comment 20 for bug 1496277

Revision history for this message
Steven Hardy (shardy) wrote : Re: template-validate may read server local files

Actually, it appears some of my remarks in comment #15 are wrong - it looks like the normal stack.Stack.validate() path is also affected by this, e.g my rework of template validation doesn't fix it, which means you can probably also trigger this via create/update too.

$ curl -g -i -X POST http://192.168.0.16:8004/v1/63b7b69cab914cb5beeaaee26b933aac/validate -H "User-Agent: python-heatclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: putatokenhere" -d '{"files": {}, "environment": {}, "template": {"heat_template_version": "2013-05-23", "resources": {"test": {"type": "file:///etc/passwd#.yaml"}}}}'

This fails with "The template is not a JSON object" even with my patches applied, when it should fail saying the type cannot be found.