fix is_pctext so that it actually catches corrupt spots and announces
authorminima <minima>
Wed, 7 Nov 2001 12:00:35 +0000 (12:00 +0000)
committerminima <minima>
Wed, 7 Nov 2001 12:00:35 +0000 (12:00 +0000)
Changes
perl/DXUtil.pm

diff --git a/Changes b/Changes
index 7988e3d85ed13862ecc7d5bfc0333ef6d161f1d1..3c472a5097924d5ed731fd54bf1412bd42bdd5f4 100644 (file)
--- 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.
index 4246754832f4eb80fe99f7e5a77944e31b32844d..ed714fe82c11b0862ef8d7051b4349e1e66f81d6 100644 (file)
@@ -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 */-)