]> git.donarmstrong.com Git - dak.git/commitdiff
debianqueued: only start processing files with a sane name
authorAnsgar Burchardt <ansgar@debian.org>
Thu, 6 Dec 2012 11:32:02 +0000 (12:32 +0100)
committerAnsgar Burchardt <ansgar@debian.org>
Thu, 6 Dec 2012 11:32:02 +0000 (12:32 +0100)
tools/debianqueued-0.9/debianqueued

index 4d2daa093ee72dbb37662c56637a6df06b5a3ba3..4c77e2af0e52f9ebd043c50ea434fa36d7baaf44 100755 (executable)
@@ -490,6 +490,7 @@ sub check_dir() {
     # look for *.commands and *.dak-commands files but not in delayed queues
     if ( $adelay == -1 ) {
       foreach $file (<*.commands>) {
+        next unless $file =~ /$re_file_safe/;
         init_mail($file);
         block_signals();
         process_commands($file);
@@ -499,6 +500,7 @@ sub check_dir() {
         finish_mail();
       } ## end foreach $file (<*.commands>)
          foreach $file (<*.dak-commands>) {
+               next unless $file =~ /$re_file_safe/;
                init_mail($file);
                block_signals();
                process_dak_commands($file);
@@ -522,6 +524,7 @@ sub check_dir() {
     @changes = grep /\.changes$/, @files;
     push( @keep_files, @changes );    # .changes files aren't stray
     foreach $file (@changes) {
+      next unless $file =~ /$re_file_safe/;
       init_mail($file);
 
       # wrap in an eval to allow jumpbacks to here with die in case
@@ -562,6 +565,7 @@ sub check_dir() {
       my ( $maint, $pattern, @job_files );
       if (    $file =~ /^junk-for-writable-test/
            || $file !~ m,$conf::valid_files,
+           || $file !~ /$re_file_safe/
            || $age >= $conf::stray_remove_timeout )
       {
         msg( "log",