From ab4e2900dd300d5f6e55227cdabb3cf2bf5db7a7 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 27 Mar 2002 07:08:08 +0000 Subject: [PATCH] don't show queue arguments (passwords!) on svc_* screens (unless queue_dangerous_options!) --- FS/FS/queue.pm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/FS/FS/queue.pm b/FS/FS/queue.pm index e5369cf82..4b880a23c 100644 --- a/FS/FS/queue.pm +++ b/FS/FS/queue.pm @@ -251,17 +251,26 @@ END $html .= 'Account' unless $hashref->{svcnum}; $html .= ''; + my $dangerous = $conf->exists('queue_dangerous_controls'); + my $p = FS::CGI::popurl(2); foreach my $queue ( sort { $a->getfield('jobnum') <=> $b->getfield('jobnum') } @queue ) { my $queue_hashref = $queue->hashref; my $jobnum = $queue->jobnum; - my $args = join(' ', $queue->args); + + my $args; + if ( $dangerous || $queue->job !~ /^FS::part_export::/ || !$noactions ) { + $args = join(' ', $queue->args); + } else { + $args = ''; + } + my $date = time2str( "%a %b %e %T %Y", $queue->_date ); my $status = $queue->status; $status .= ': '. $queue->statustext if $queue->statustext; - if ( $conf->exists('queue_dangerous_controls') + if ( $dangerous || ( ! $noactions && $status =~ /^failed/ || $status =~ /^locked/ ) ) { $status .= qq! ( retry |!. @@ -305,7 +314,7 @@ END =head1 VERSION -$Id: queue.pm,v 1.9 2002-03-24 14:29:00 ivan Exp $ +$Id: queue.pm,v 1.10 2002-03-27 07:08:08 ivan Exp $ =head1 BUGS -- 2.11.0