Make sure variable doesn't contain a new line

This commit is contained in:
Jamie Cameron
2026-10-09 21:11:45 -07:00
parent c51f0ed465
commit bc87da9048
2 changed files with 5 additions and 0 deletions

View File

@@ -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

View File

@@ -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'});
}