return unless defined $plugin;
my ($plugin_read, $plugin_write);
- my $pid = open2($plugin_read, $plugin_write, $plugin);
+ my $pid = open2($plugin_read, $plugin_write,
+ IkiWiki::possibly_foolish_untaint($plugin));
# open2 doesn't respect "use open ':utf8'"
binmode($plugin_read, ':utf8');
return $ret;
} #}}}
+sub getstate ($$$$) { #{{{
+ my $plugin=shift;
+ my $page=shift;
+ my $id=shift;
+ my $key=shift;
+
+ return $IkiWiki::pagestate{$page}{$id}{$key};
+} #}}}
+
+sub setstate ($$$$;@) { #{{{
+ my $plugin=shift;
+ my $page=shift;
+ my $id=shift;
+ my $key=shift;
+
+ return $IkiWiki::pagestate{$page}{$id}{$key}=@_;
+} #}}}
+
sub inject ($@) { #{{{
# Bind a given perl function name to a particular RPC request.
my $plugin=shift;