diff --git a/cron/lang/en b/cron/lang/en index f0ed1f4bb..c7d4d9c9d 100644 --- a/cron/lang/en +++ b/cron/lang/en @@ -81,6 +81,8 @@ lcedit_special_reboot=when system boots save_err=Failed to save cron job save_ecmd=You did not enter a command to execute +save_ename=Missing or invalid environment variable name +save_evalue=Invalid environment variable value save_euser=You must select a user save_euser2=User '$1' does not exist save_eallow=The user '$1' is not allowed to access cron diff --git a/cron/save_env.cgi b/cron/save_env.cgi index 721334250..71a8ab803 100755 --- a/cron/save_env.cgi +++ b/cron/save_env.cgi @@ -38,6 +38,9 @@ foreach $f (@files) { &lock_file($f); } if ($in{'name'} !~ /^\S+$/) { &error($text{'save_ename'}); } +if ($in{'value'} =~ /\r|\n/) { + &error($text{'save_evalue'}); + } if (!$in{'user'}) { &error($text{'save_euser'}); }