Skip to content

Commit

Permalink
Clean up unused argument
Browse files Browse the repository at this point in the history
For some reason get_test_results used to add 'ns' arguments to entries
from the Nameserver module. These are interpolated into the message
anyway, and no other entries are returned with raw arguments. In zonemaster#1092
we accidentally broke this behavior, but since the behavior was
undocument and unintended, it's better to clean it up than to fix it.
  • Loading branch information
mattias-p committed Jan 18, 2024
1 parent d5b4e57 commit f34a150
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/Zonemaster/Backend/RPCAPI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,7 @@ sub get_test_results {
my $test_info = $self->{db}->test_results( $params->{id} );
foreach my $test_res ( @{ $test_info->{results} } ) {
my $res;
if ( $test_res->{module} eq 'NAMESERVER' ) {
$res->{ns} = ( $test_res->{args}->{ns} ) ? ( $test_res->{args}->{ns} ) : ( 'All' );
}
elsif ($test_res->{module} eq 'SYSTEM'
if ($test_res->{module} eq 'SYSTEM'
&& $test_res->{tag} eq 'POLICY_DISABLED'
&& $test_res->{args}->{name} eq 'Example' )
{
Expand Down

0 comments on commit f34a150

Please sign in to comment.