]> git.proxmox.com Git - pve-manager.git/commit - PVE/HTTPServer.pm
Fix #1589: auth_handler: raise exception on init_request error
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 7 Dec 2017 13:00:36 +0000 (14:00 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 11 Dec 2017 13:53:18 +0000 (14:53 +0100)
commit46095dd4a59525dca70df9508db8dcf87f7160c5
tree453af25235fd86593803b75b9125e41742d867d9
parentff5a8a9b442ef27af7403cf25110b26de0b0e0f3
Fix #1589: auth_handler: raise exception on init_request error

cfs_* methods cann now die (rightfully so) when the IPCC endpoint is
not connected, or another grave IPCC error arised.

As we did not catch those problems in the RPCEnvironments
init_request method, which loads the user config, this got
propagated to the anyevents auth_handler call in its
unshift_read_header method where then all errors where processed in
the same way => with an unauthorized response logging an logged in
user out.

So catch this error and raise an internal server errror exception
instead. Anyevent needs some minor modifiaction in a separate patch
to handle PVE::Exceptions correctly, so this is the partial fix for
bug #1589

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/HTTPServer.pm