From 8efcd7c490c7b5bf4f2190214b992f91a0dfdc9b Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Sat, 21 Sep 2019 15:39:22 +0100 Subject: [PATCH] tiddle a bit with PC[61]1 spot validation with a view toward only allowing known users spots through. --- perl/DXProtHandle.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index d4ce6bf6..e108666c 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -158,17 +158,21 @@ sub handle_11 # if this is a 'nodx' node then ignore it if ($badnode->in($pc->[7])) { - dbg("PCPROT: Bad Node, dropped") if isdbg('chanerr'); + dbg("PCPROT: Bad Node $pc->[7], dropped") if isdbg('chanerr'); return; } - # if this is a 'bad spotter' user then ignore it + # if this is a 'bad spotter' or an unknown user then ignore it. BUT if it's got an IP address then allow it through my $nossid = $pc->[6]; $nossid =~ s/-\d+$//; if ($badspotter->in($nossid)) { - dbg("PCPROT: Bad Spotter, dropped") if isdbg('chanerr'); + dbg("PCPROT: Bad Spotter $pc->[6], dropped") if isdbg('chanerr'); return; } +# unless (is_ipaddr($pc->[8]) || DXUser::get_current($pc->[6])) { +# dbg("PCPROT: Unknown Spotter $pc->[6], dropped") if isdbg('chanerr'); +# return; +# } # convert the date to a unix date my $d = cltounix($pc->[3], $pc->[4]); -- 2.43.0