mirror of
https://git.proxmox.com/git/pve-http-server
synced 2025-05-30 11:39:06 +00:00
html formatter: encode href attributes
these contain untrusted data, so treat them accordingly.
Reported-by: Li, Jian Tao <li.jiantao@starlabs.sg>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit 6781735008
)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
cdaec513e0
commit
00661f1223
@ -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…
Reference in New Issue
Block a user