Project

General

Profile

Actions

Bug #24503

closed

snippets macro does not render a snippet partial from filesystem

Added by Timo Goebel over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Templates
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

The snippets macro does not work anymore. It errors with "undefined method: render".

I believe it hasn't worked before as it tried to render a snippet from `app/views/unattended/snippets`, but the folder does not exist.

If I revert the template scope refactoring and create the folder, it errors with "AbstractController::DoubleRenderError in ProvisioningTemplatesController#preview"

In addition, the method is potentially dangerous as it allows a user to use ../

<%= snippets('../provisioning_templates/snippet/puppet.conf') %>

I was not able to break out of app/views but I guess we should not rely on that.


Related issues 1 (0 open1 closed)

Related to Foreman - Refactor #22529: Refactor Template rendering to use a proper rendering serviceClosedTimo GoebelActions
Actions

Also available in: Atom PDF