mirror of
git://git.proxmox.com/git/pve-http-server.git
synced 2025-01-22 22:03:52 +03:00
html formatter: encode href attributes
these contain untrusted data, so treat them accordingly. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
34f20af260
commit
6781735008
@ -91,7 +91,7 @@ sub render_page {
|
||||
text => 'Home'}};
|
||||
|
||||
foreach my $comp (@pcomp) {
|
||||
$href .= "/$comp";
|
||||
$href .= "/".encode_entities($comp);
|
||||
push @$items, { tag => 'li', cn => {
|
||||
tag => 'a',
|
||||
href => $href,
|
||||
@ -214,7 +214,7 @@ PVE::APIServer::Formatter::register_formatter($portal_format, sub {
|
||||
push @$items, {
|
||||
tag => 'a',
|
||||
class => 'list-group-item',
|
||||
href => "$path/$value",
|
||||
href => "$path/".encode_entities($value),
|
||||
cn => [
|
||||
{
|
||||
tag => 'h4',
|
||||
|
Loading…
x
Reference in New Issue
Block a user