mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 04:19:27 +01:00
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.
This commit is contained in:
parent
58a629eca4
commit
b6aecce701
@ -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') });
|
||||
|
Loading…
Reference in New Issue
Block a user