"no-signed-off-cc|no-signed-off-by-cc" => \$no_signed_off_cc,
);
+# Verify the user input
+
+foreach my $entry (@to) {
+ die "Comma in --to entry: $entry'\n" unless $entry !~ m/,/;
+}
+
+foreach my $entry (@initial_cc) {
+ die "Comma in --cc entry: $entry'\n" unless $entry !~ m/,/;
+}
+
+foreach my $entry (@bcclist) {
+ die "Comma in --bcclist entry: $entry'\n" unless $entry !~ m/,/;
+}
+
# Now, let's fill any that aren't set in with defaults:
sub gitvar {
sub extract_valid_address {
my $address = shift;
my $local_part_regexp = '[^<>"\s@]+';
- my $domain_regexp = '[^.<>"\s@]+\.[^<>"\s@]+';
+ my $domain_regexp = '[^.<>"\s@]+(?:\.[^.<>"\s@]+)+';
# check for a local address:
return $address if ($address =~ /^($local_part_regexp)$/);