Skip to content

Commit

Permalink
System/Settings/Cron - improve escaping in /var/cron/tabs/nobody gene…
Browse files Browse the repository at this point in the history
…ration.
  • Loading branch information
AdSchellevis committed Jul 3, 2023
1 parent e3f37c6 commit e800097
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/opnsense/service/templates/OPNsense/Cron/user.cron
Expand Up @@ -10,9 +10,9 @@ 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.minutes}} {{job.hours}} {{job.days}} {{job.months}} {{job.weekdays}} /usr/local/sbin/configctl -d {{job.command|replace("\n", "")|shlex_quote}}{%
if job.parameters %}{%
for param in job.parameters|shlex_split %} {{param|shlex_quote}}{%
for param in job.parameters|shlex_split %} {{param|replace("\n", "")|shlex_quote}}{%
endfor %}{% endif %}

{% endif %}
Expand Down

0 comments on commit e800097

Please sign in to comment.