mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
Cron - shell escape parameters using shlex functions
This commit is contained in:
parent
6db23da495
commit
88ab77fc85
@ -10,7 +10,11 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
|
||||
{% for job in helpers.toList('OPNsense.cron.jobs.job') %}
|
||||
{% if job.enabled|default('0') == '1' %}
|
||||
# Origin/Description: {{job.origin}}/{{job.description}}
|
||||
{{job.minutes}} {{job.hours}} {{job.days}} {{job.months}} {{job.weekdays}} /usr/local/sbin/configctl -d {{job.command}} {{job.parameters}}
|
||||
{{job.minutes}} {{job.hours}} {{job.days}} {{job.months}} {{job.weekdays}} /usr/local/sbin/configctl -d {{job.command}} {%
|
||||
if job.parameters %} {%
|
||||
for param in job.parameters|shlex_split %} {{param|shlex_quote}}{%
|
||||
endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user