Skip to content

Commit

Permalink
Validate R parameter in irc.cgi
Browse files Browse the repository at this point in the history
This matches the check done in nph-irc.cgi.
  • Loading branch information
dgl committed May 9, 2017
1 parent 14f36ce commit 46dd484
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions irc.cgi
Expand Up @@ -73,6 +73,7 @@ require($interface . '.pm');

if(ref $cgi && defined $cgi->{item}) {
print "\r\n"; # send final header
error('Communication socket name is invalid') if $cgi->{R} =~ /[^A-Za-z0-9]/;
my $name = $cgi->{item};
exit unless $interface->exists($name);
$interface->$name($cgi, $config, 0);
Expand Down

0 comments on commit 46dd484

Please sign in to comment.