mirror of
https://git.proxmox.com/git/pve-http-server
synced 2025-07-03 16:06:42 +00:00
fix regression in api/html (bootstrap) viewer
Since v5.13, URI::Escape handles the 'unsafe characters' parameter
differently than before, i.e., enforcing what is documented [0]:
The set is specified as a string that can be used in a regular
expression character class (between [ ]).
So, the leading/trailing [] were never supposed to be there.
Note that since v5.15 we could also pass a qr// regex object.
[0]: 1a4ed66802
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[ T: Add details and mention regex objects ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
1a555dd93c
commit
d0f4b94507
@ -167,7 +167,7 @@ sub el {
|
|||||||
|
|
||||||
foreach my $attr (keys %param) {
|
foreach my $attr (keys %param) {
|
||||||
next if $skip->{$attr};
|
next if $skip->{$attr};
|
||||||
my $v = $noescape->{$attr} ? $param{$attr} : uri_escape_utf8($param{$attr},"[^\/\ A-Za-z0-9\-\._~]");
|
my $v = $noescape->{$attr} ? $param{$attr} : uri_escape_utf8($param{$attr}, "^\/\ A-Za-z0-9\-\._~");
|
||||||
next if !defined($v);
|
next if !defined($v);
|
||||||
if ($boolattr->{$attr}) {
|
if ($boolattr->{$attr}) {
|
||||||
$html .= " $attr" if $v;
|
$html .= " $attr" if $v;
|
||||||
|
Loading…
Reference in New Issue
Block a user