mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-16 04:58:32 +00:00
http server: allow duplicate params (URI and form) if equal
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
d3b3b4ad2a
commit
a2beaf1374
@ -142,9 +142,11 @@ sub rest_handler {
|
|||||||
($handler, $info) = PVE::API2->find_handler($method, $rel_uri, $uri_param);
|
($handler, $info) = PVE::API2->find_handler($method, $rel_uri, $uri_param);
|
||||||
return if !$handler || !$info;
|
return if !$handler || !$info;
|
||||||
|
|
||||||
foreach my $p (keys %{$params}) {
|
foreach my $p (sort keys %{$params}) {
|
||||||
if (defined($uri_param->{$p})) {
|
if (defined($uri_param->{$p}) && $uri_param->{$p} ne $params->{$p}) {
|
||||||
raise_param_exc({$p => "duplicate parameter (already defined in URI)"});
|
raise_param_exc({
|
||||||
|
$p => "duplicate parameter (already defined in URI) with conflicting values!"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
$uri_param->{$p} = $params->{$p};
|
$uri_param->{$p} = $params->{$p};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user