Skip to content

Commit

Permalink
Fix to address XSS issues #2
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Aug 9, 2023
1 parent 03a1f39 commit 84b53e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ssh/list_auths.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (@auths) {
foreach $a (@auths) {
print &ui_columns_row([
"<a href='edit_auth.cgi?idx=$a->{'index'}'>".
"$a->{'name'}</a>",
"@{[&html_escape($a->{'name'})]}</a>",
"<tt>".substr($a->{'key'}, 0, 40)." ... ".
substr($a->{'key'}, -40)."</tt>",
]);
Expand Down
2 changes: 1 addition & 1 deletion ssh/list_hosts.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ foreach $h (@$hconf) {
if (lc($h->{'name'}) eq 'host') {
push(@links, "edit_host.cgi?idx=$i");
push(@icons, "images/host.gif");
push(@titles, $h->{'values'}->[0] eq '*' ? "<i>$text{'hosts_all'}</i>" : $h->{'values'}->[0]);
push(@titles, $h->{'values'}->[0] eq '*' ? "<i>$text{'hosts_all'}</i>" : &html_escape($h->{'values'}->[0]));
}
$i++;
}
Expand Down

0 comments on commit 84b53e6

Please sign in to comment.