Don't allow @ in usernames, cause it doesn't work anyway

This commit is contained in:
Jamie Cameron
2008-05-22 20:11:14 +00:00
parent 42b7633575
commit 3f7e6bfbf9
4 changed files with 4 additions and 1 deletions

View File

@@ -74,7 +74,7 @@ else {
if ($status{'status'} = 'complete') {
# Execute the post-backup script
$bok = &execute_after($dump, OUT, 0);
if (!$bok && && !$dump->{'afterfok'}) {
if (!$bok && !$dump->{'afterfok'}) {
print OUT "\n$text{'email_eafter'}\n";
$status{'status'} = 'failed';
$ok = 0;

View File

@@ -148,6 +148,7 @@ else {
&error($text{'dump_ehost'});
$_[0]->{'host'} = $in{'host'};
$in{'huser'} =~ /^\S+$/ || &error($text{'dump_ehuser'});
$in{'huser'} =~ /\@/ && &error($text{'dump_ehuser2'});
$_[0]->{'huser'} = $in{'huser'};
$in{'hfile'} || &error($text{'dump_ehfile'});
$_[0]->{'hfile'} = $in{'hfile'};

View File

@@ -42,6 +42,7 @@ dump_edir=Missing or invalid directory to backup
dump_efile=Missing file or device to backup to
dump_ehost=Missing or invalid host to backup to
dump_ehuser=Invalid username on host to backup to
dump_ehuser2=Username cannot contain the @ character
dump_ehfile=Missing or invalid file or device on host to backup to
dump_elabel=Invalid backup label (can be at most 15 characters)
dump_elabel2=Invalid backup label (can be at most 255 characters)

View File

@@ -208,6 +208,7 @@ else {
&error($text{'dump_ehost'});
$_[0]->{'host'} = $in{'host'};
$in{'huser'} =~ /^\S*$/ || &error($text{'dump_ehuser'});
$in{'huser'} =~ /\@/ && &error($text{'dump_ehuser2'});
$_[0]->{'huser'} = $in{'huser'};
$in{'hfile'} || &error($text{'dump_ehfile'});
$_[0]->{'hfile'} = $in{'hfile'};