Commit c84c1809 authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 172740 - "use of uninitialized variable" warnings. Patch by gerv; r=bbaetz.

parent b8851cdd
......@@ -83,7 +83,7 @@ else {
}
# Hack to support legacy applications that think the RDF ctype is at format=rdf.
if ($::FORM{'format'} eq "rdf" && !$::FORM{'ctype'}) {
if ($::FORM{'format'} && $::FORM{'format'} eq "rdf" && !$::FORM{'ctype'}) {
$::FORM{'ctype'} = "rdf";
delete($::FORM{'format'});
}
......
......@@ -1631,6 +1631,7 @@ sub GetFormat {
my ($template, $format, $ctype) = @_;
$ctype ||= "html";
$format ||= "";
# Security - allow letters and a hyphen only
$ctype =~ s/[^a-zA-Z\-]//g;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment