[pve-devel] [PATCH pve-manager 6/9] HTTPServer.pm: call rpcenv->init_request earlier.

Dietmar Maurer dietmar at proxmox.com
Mon Jan 16 10:59:36 CET 2017


Because we access file from /etc/pve/ in auth_handler.

Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
 PVE/HTTPServer.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/HTTPServer.pm b/PVE/HTTPServer.pm
index 5ae0e97..ab8526b 100755
--- a/PVE/HTTPServer.pm
+++ b/PVE/HTTPServer.pm
@@ -59,6 +59,8 @@ sub auth_handler {
     $rpcenv->set_language('C');
     $rpcenv->set_client_ip($peer_host);
 
+    $rpcenv->init_request();
+
     my $require_auth = 1;
 
     # explicitly allow some calls without auth
@@ -129,8 +131,6 @@ sub rest_handler {
 
     my $rpcenv = $self->{rpcenv};
 
-    $rpcenv->init_request();
-
     my $base_handler_class = $self->{base_handler_class};
 
     die "no base handler - internal error" if !$base_handler_class;
-- 
2.1.4




More information about the pve-devel mailing list