From b6aecce70133b4b1c9322e0253a4d712ebfc4acd Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 3 Sep 2017 01:38:25 -0700 Subject: [PATCH] Temporarily disable code-factoids There are a wide range of potential denial-of-service attacks possible without severely restricting the allowed opcodes. As such, we are setting code-factoids' default state to disabled. Enable at your own risk. There are plans to move the code-factoid logic to a virtual machine. --- PBot/Factoids.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index 5cb245c9..c9e14131 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -546,6 +546,8 @@ sub expand_action_arguments { sub execute_code_factoid { my ($self, $nick, $from, $chan, $root_keyword, $keyword, $arguments, $code, $tonick) = @_; + return "/say code-factoids are temporarily disabled."; + my $ppi = PPI::Document->new(\$code, readonly => 1); return "/say $nick: I don't feel so good." if not $ppi; my $vars = $ppi->find(sub { $_[1]->isa('PPI::Token::Symbol') });