From fa9e414f691e4e9a80c80eb54cb7b1e971976b22 Mon Sep 17 00:00:00 2001 From: minima Date: Wed, 7 Nov 2001 12:00:35 +0000 Subject: [PATCH] fix is_pctext so that it actually catches corrupt spots and announces --- Changes | 2 ++ perl/DXUtil.pm | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 7988e3d8..3c472a50 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +07Nov01======================================================================= +1. fix is_pctext so that it actually catches corrupt spots and announces. 06Nov01======================================================================= 1. fix read so that sysop reading doesn't increment the read counter for private mail not addressed to them. diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm index 42467548..ed714fe8 100644 --- a/perl/DXUtil.pm +++ b/perl/DXUtil.pm @@ -346,7 +346,8 @@ sub is_callsign # check that a PC protocol field is valid text sub is_pctext { - return $_[0] =~ /^[\x09\x20-\xFF]+$/; + return undef if $_[0] =~ /[\x00-\x08\x0a-\x1f\xf0-\xff]/; + return $_[0]; } # check that a PC prot flag is fairly valid (doesn't check the difference between 1/0 and */-) -- 2.34.1