When creating a new cron job through CloudPanel, any backslash (\) included in the command, such as in the usage of "time='$(date +\%s)", is removed. This issue causes the command to be executed incorrectly, leading to potential errors or unintended behavior. The backslash is essential for escaping certain characters or sequences in shell commands, and its removal disrupts the intended function of the cron job.
How to reproduce
Log in to CloudPanel and navigate to the section where you can create a new cron job.
Create a new cron job with the following command: time='$(date +\%s)
Save the cron job and then review the command that has been saved.
Observe that the backslash (\) before %s has been removed, resulting in the command being saved as: time='$(date +%s)
CloudPanel version(s) affected
2.4.2
Description
When creating a new cron job through CloudPanel, any backslash (\) included in the command, such as in the usage of "time='$(date +\%s)", is removed. This issue causes the command to be executed incorrectly, leading to potential errors or unintended behavior. The backslash is essential for escaping certain characters or sequences in shell commands, and its removal disrupts the intended function of the cron job.
How to reproduce
Possible Solution
No response
Additional Context
No response