From 44475d5b0012d97320c7124b8be583884ce759cd Mon Sep 17 00:00:00 2001 From: dms Date: Thu, 21 Nov 2002 13:22:57 +0000 Subject: [PATCH] - regex now safe in factoid redirection. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@653 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/Factoids/Question.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/blootbot/src/Factoids/Question.pl b/blootbot/src/Factoids/Question.pl index 4629dd1..0fb25fb 100644 --- a/blootbot/src/Factoids/Question.pl +++ b/blootbot/src/Factoids/Question.pl @@ -11,7 +11,7 @@ ## ## -if (&IsParam("useStrict")) { use strict; } +# use strict; # TODO use vars qw($query $reply $finalQMark $nuh $result $talkok $who $nuh); use vars qw(%bots %forked); @@ -109,13 +109,17 @@ sub doQuestion { while ($result =~ /^see( also)? (.*?)\.?$/) { my $link = $2; - if (grep /^$link$/i, @link) { + # #debian@OPN was having problems with libstdc++ factoid + # redirection :) 20021116. -xk. + # hrm... allow recursive loops... next if statement handles + # that. + if (grep /^\Q$link\E$/i, @link) { &status("recursive link found; bailing out."); last; } if (scalar @link >= 5) { - &status("recursive link limit reached."); + &status("recursive link limit (5) reached."); last; } -- 2.39.5