pve-http-server/PVE/APIServer
Stoiko Ivanov c6de5b3f2d access control: correctly match v4-mapped-v6 addresses
With recent changes to the listening socket code in pve-manager
the proxy daemons now usually bind to '::' and ipv4 clients are
read as v4-mapped-v6 addresses [0] from ::ffff:0:0/96.

This caused the allow_from/deny_from matching to break.

This patch addresses the issue by normalizing addresses from
::ffff:0:0/96 using Net::IP::ip_get_embedded_ipv4
(which roughly splits on ':' and checks if the last part looks like an
ipv4 address).

Issue was originally reported in our community forum [1]

[0] https://en.wikipedia.org/wiki/IPv6_address
[1] https://forum.proxmox.com/threads/my-pveproxy-file-doesnt-work.83228/

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-05-07 17:47:46 +02:00
..
Formatter api-server: extract, set and handle API token header 2020-01-28 20:43:51 +01:00
AnyEvent.pm access control: correctly match v4-mapped-v6 addresses 2021-05-07 17:47:46 +02:00
Formatter.pm api-server: extract, set and handle API token header 2020-01-28 20:43:51 +01:00
Utils.pm access control: correctly match v4-mapped-v6 addresses 2021-05-07 17:47:46 +02:00