mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Escape untrusted params
This commit is contained in:
committed by
Joe cooper
parent
5aed345808
commit
91f03a2109
@@ -43,8 +43,8 @@ SECT: foreach $sec (@sects) {
|
||||
}
|
||||
}
|
||||
if (!$found) {
|
||||
print "<p><b>",&text('man_noentry', "<tt>$in{'page'}</tt>"),
|
||||
"</b><p>\n";
|
||||
print "<p><b>",&text('man_noentry',
|
||||
"<tt>".&html_escape($in{'page'})."</tt>"),"</b><p>\n";
|
||||
}
|
||||
else {
|
||||
if (&has_command($config{'man2html_path'})) {
|
||||
@@ -86,13 +86,19 @@ else {
|
||||
$out =~ s/<A HREF="file:[^"]+">([^<]+)<\/a>/$1/ig;
|
||||
$out =~ s/<A HREF="view_man.cgi">/<A HREF=\"\">/i;
|
||||
}
|
||||
&show_view_table(&text('man_header', $in{'page'}, $in{'sec'}),
|
||||
$out);
|
||||
&show_view_table(
|
||||
&text('man_header',
|
||||
&html_escape($in{'page'}),
|
||||
&html_escape($in{'sec'})),
|
||||
$out);
|
||||
} else {
|
||||
$out =~ s/.\010//g;
|
||||
$out =~ s/^(man:\s*)?(re)?formatting.*//i;
|
||||
&show_view_table(&text('man_header', $in{'page'}, $in{'sec'}),
|
||||
"<pre>".&html_escape($out)."</pre>");
|
||||
&show_view_table(
|
||||
&text('man_header',
|
||||
&html_escape($in{'page'}),
|
||||
&html_escape($in{'sec'})),
|
||||
"<pre>".&html_escape($out)."</pre>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user