[Rt-commit] r3210 - in rt/branches/3.4-RELEASE: . lib/RT lib/RT/Action

jesse at bestpractical.com jesse at bestpractical.com
Thu Jun 16 12:39:37 EDT 2005


Author: jesse
Date: Thu Jun 16 12:39:36 2005
New Revision: 3210

Modified:
   rt/branches/3.4-RELEASE/   (props changed)
   rt/branches/3.4-RELEASE/lib/RT/Action/Notify.pm
   rt/branches/3.4-RELEASE/lib/RT/EmailParser.pm
   rt/branches/3.4-RELEASE/lib/RT/Queue_Overlay.pm
Log:
 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/3.4-RELEASE/lib/RT/Action/Notify.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/Action/Notify.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/Action/Notify.pm	Thu Jun 16 12:39:36 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/3.4-RELEASE/lib/RT/EmailParser.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/EmailParser.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/EmailParser.pm	Thu Jun 16 12:39:36 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/3.4-RELEASE/lib/RT/Queue_Overlay.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/Queue_Overlay.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/Queue_Overlay.pm	Thu Jun 16 12:39:36 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