]> xenbits.xensource.com Git - people/aperard/emesinae.git/commitdiff
Bug.pm: Ensure severities are valid before passing them to SQL
authorIan Campbell <ian.campbell@citrix.com>
Thu, 23 May 2013 13:27:29 +0000 (14:27 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 23 May 2013 13:27:45 +0000 (14:27 +0100)
Spotted by Tim Deegan

Emesinae/Bug.pm

index 270f9ea50893eefec2e41bec5aa360d681ce47f2..21decc999473dcded282578e77449c8699abe41f 100644 (file)
@@ -193,6 +193,7 @@ sub listall ($$;%) {
     elsif ( $args{State} eq "Closed" ) { push @where, qq(open = "false" ) }
 
     if ( $args{Severities} ) {
+        map { assert_valid_severity($_) } @ { $args{Severities} };
         push @where,
           join( " OR ", map { qq{severity = "$_"} } @{ $args{Severities} } );
     }