From 299bbec5a5628c3333cdf4ed45fed3e0c21ca753 Mon Sep 17 00:00:00 2001 From: minima Date: Wed, 24 Oct 2001 23:53:08 +0000 Subject: [PATCH] made the regexes slightly less aggressive --- Changes | 3 +++ perl/BadWords.pm | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 8ff3b6ae..e7df720f 100644 --- a/Changes +++ b/Changes @@ -14,6 +14,9 @@ registration you will also issue passwords to those registered users. change them. 4. A non-registered user will get the /spider/data/motd_nor file instead of the motd on login. +5. made the BadWord regexes slightly less aggressive WARNING this may let +some constructions thru, but hopefully will also allow more legitimate +foreign (mainly) things thru as well. 19Oct01======================================================================= 1. Allow DELETE (0x7f) for backspace in console.pl 2. redo prefix table using latest cty.dat diff --git a/perl/BadWords.pm b/perl/BadWords.pm index 7ae0373f..d0572cc2 100644 --- a/perl/BadWords.pm +++ b/perl/BadWords.pm @@ -75,7 +75,7 @@ sub create_regex my $w = uc $_; my @l = split //, $w; my $e = join '+[\s\W]*', @l; - $s .= "push \@out, \$1 if \$str =~ /($e)/;\n"; + $s .= "push \@out, \$1 if \$str =~ /\\b($e)/;\n"; } } $s .= "return \@out;\n}"; -- 2.34.1