[pmg-devel] [PATCH pmg-api] initialize $ticket with empty string if no auth_cookie present
Dominik Csapak
d.csapak at proxmox.com
Wed Feb 7 11:25:45 CET 2018
this prevents a unintialized value in match error
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
PMG/Service/pmgproxy.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PMG/Service/pmgproxy.pm b/PMG/Service/pmgproxy.pm
index 19ab7da..2fd2789 100755
--- a/PMG/Service/pmgproxy.pm
+++ b/PMG/Service/pmgproxy.pm
@@ -154,7 +154,7 @@ sub get_index {
$lang = $newlang;
}
}
- my $ticket = PVE::APIServer::Formatter::extract_auth_cookie($cookie, $server->{cookie_name});
+ my $ticket = PVE::APIServer::Formatter::extract_auth_cookie($cookie, $server->{cookie_name}) || '';
if ($ticket =~ m/^PMGQUAR:/) {
$username = PMG::Ticket::verify_quarantine_ticket($ticket, 1);
--
2.11.0
More information about the pmg-devel
mailing list