[Rt-commit] r3217 - in rt/branches/QUEBEC-EXPERIMENTAL: . lib/RT
lib/RT/Action
jesse at bestpractical.com
jesse at bestpractical.com
Thu Jun 16 13:31:55 EDT 2005
Author: jesse
Date: Thu Jun 16 13:31:55 2005
New Revision: 3217
Modified:
rt/branches/QUEBEC-EXPERIMENTAL/ (props changed)
rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Action/Notify.pm
rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/EmailParser.pm
rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Queue_Overlay.pm
Log:
r20731 at hualien: jesse | 2005-06-16 12:43:44 -0400
r20715 at hualien: jesse | 2005-06-16 12:20:34 -0400
r20712 at hualien: jesse | 2005-06-16 12:16:22 -0400
r20710 at hualien (orig r3203): alexmv | 2005-06-16 04:29:14 -0400
r4306 at zoq-fot-pik: chmrr | 2005-06-16 04:29:06 -0400
* Move /^$foo$/ regexes to use eq instead, to prevent regex insertion
exploits
Modified: rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Action/Notify.pm
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Action/Notify.pm (original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Action/Notify.pm Thu Jun 16 13:31:55 2005
@@ -158,9 +158,9 @@
@{ $self->{'Bcc'} } = @Bcc;
}
else {
- @{ $self->{'To'} } = grep ( !/^$creator$/, @To );
- @{ $self->{'Cc'} } = grep ( !/^$creator$/, @Cc );
- @{ $self->{'Bcc'} } = grep ( !/^$creator$/, @Bcc );
+ @{ $self->{'To'} } = grep ( lc $_ ne $creator, @To );
+ @{ $self->{'Cc'} } = grep ( lc $_ ne $creator, @Cc );
+ @{ $self->{'Bcc'} } = grep ( lc $_ ne $creator, @Bcc );
}
@{ $self->{'PseudoTo'} } = @PseudoTo;
Modified: rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/EmailParser.pm
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/EmailParser.pm (original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/EmailParser.pm Thu Jun 16 13:31:55 2005
@@ -316,9 +316,9 @@
my $Address = $AddrObj->address;
my $user = RT::User->new($RT::SystemUser);
$Address = $user->CanonicalizeEmailAddress($Address);
- next if ( $args{'CurrentUser'}->EmailAddress =~ /^$Address$/i );
- next if ( $args{'QueueObj'}->CorrespondAddress =~ /^$Address$/i );
- next if ( $args{'QueueObj'}->CommentAddress =~ /^$Address$/i );
+ next if ( lc $args{'CurrentUser'}->EmailAddress eq lc $Address );
+ next if ( lc $args{'QueueObj'}->CorrespondAddress eq lc $Address );
+ next if ( lc $args{'QueueObj'}->CommentAddress eq lc $Address );
next if ( IsRTAddress($Address) );
push ( @Addresses, $Address );
Modified: rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Queue_Overlay.pm
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Queue_Overlay.pm (original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Queue_Overlay.pm Thu Jun 16 13:31:55 2005
@@ -246,7 +246,7 @@
my $self = shift;
my $value = shift;
- my $retval = grep ( /^$value$/, $self->StatusArray );
+ my $retval = grep ( $_ eq $value, $self->StatusArray );
return ($retval);
}
@@ -272,7 +272,7 @@
my $self = shift;
my $value = shift;
- my $retval = grep ( /^$value$/, $self->ActiveStatusArray );
+ my $retval = grep ( $_ eq $value, $self->ActiveStatusArray );
return ($retval);
}
@@ -298,7 +298,7 @@
my $self = shift;
my $value = shift;
- my $retval = grep ( /^$value$/, $self->InactiveStatusArray );
+ my $retval = grep ( $_ eq $value, $self->InactiveStatusArray );
return ($retval);
}
More information about the Rt-commit
mailing list