sub check_form_input { my $r_in = shift; # mod.2000.11.14.01 security patch # parameter forum should only be alphanumeric characters if ($r_in->{'forum'}) { $r_in->{'forum'} =~ s/\W//g; } if ($r_in->{'s_forum'}) { $r_in->{'s_forum'} =~ s/\W//g; } # parameter conf should only be alphanumeric characters if ($r_in->{'conf'}) { $r_in->{'conf'} =~ s/\W//g; } # mod.2001.03.30.01 security patch # parameter az should only be alphanumeric characters if ($r_in->{'az'}) { $r_in->{'az'} =~ s/\W//g; } # parameter command should only be alphanumeric characters if ($r_in->{'command'}) { $r_in->{'command'} =~ s/\W//g; } # parameter command should only be alphanumeric characters if ($r_in->{'quote'}) { $r_in->{'quote'} =~ s/\W//g; } # parameter om should only be numeric characters if ($r_in->{'om'}) { $r_in->{'om'} =~ s/\D//g; } # parameter omm should only be alphanumeric characters if ($r_in->{'omm'}) { $r_in->{'omm'} =~ s/\D//g; } # parameter mark should only be alphanumeric characters if ($r_in->{'mark'}) { $r_in->{'mark'} =~ s/\D//g; } # If body, strip off any HTML tags of the form # script, object, embeb, applet, form, input if ($r_in->{'body'}) { $r_in->{'body'} =~ s/\[\s*\/?(script|object|embed|applet|form|input|\n)[^\]]*\]//gi; # Also remove any SSI tags $r_in->{'body'} =~ s/\[\!--\#([^\]]|\n)*--\]//gi; } # Remove any HTML tags in subject if ($r_in->{'subject'}) { $r_in->{'subject'} =~ s/\[(([^\]]|\n)*)\]//gi; } # Remove any HTML tags in name if ($r_in->{'name'}) { $r_in->{'name'} =~ s/\[(([^\]]|\n)*)\]//gi; } return $r_in; }