outroll / vesta

VESTA Control Panel
http://vestacp.com
GNU General Public License v3.0
2.94k stars 1.03k forks source link

v-add-cron-job weirdness #1931

Open plutocrat opened 5 years ago

plutocrat commented 5 years ago

Operating System (OS/VERSION):

Ubuntu 18.04

VestaCP Version:

0.9.8-25

Steps to Reproduce:

Add a cron job via the web interface. Look in system log. tail /var/log/vesta/system.log Command is logged as v-add-cron-job 'admin' '30' '11' 'autoupdate index.php reports' 'autoupdate index.php reports' 'autoupdate index.php reports' '/home/admin/scripts/null.sh' The job adds correctly, but the 'autoupdate index.php reports' bits must surely be wrong! Just seemed a bit weird to me ...

plutocrat commented 5 years ago

Job is entered correctly in $VESTA/data/users/admin/cron.conf crontab -l -u admin is correct. So I'm thinking it must be a problem with the logging perhaps not escaping the "*"

Lupul commented 5 years ago

I had the same issue recently, asterisk is used unescaped when building the argument list as you also noticed. Feel free to take the fix from here: https://github.com/hestiacp/hestiacp/commit/3497037d3e64e090a982e8ae43152ee9ab0ff256