From d1458d0063467183147b92383692b02b8f85d366 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Mon, 29 Oct 2012 17:05:23 -0500 Subject: [PATCH] websocketproxy.py: better missing token exception. --- websockify/websocketproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websockify/websocketproxy.py b/websockify/websocketproxy.py index 8bd67ec..060125d 100755 --- a/websockify/websocketproxy.py +++ b/websockify/websocketproxy.py @@ -205,7 +205,7 @@ Traffic Legend: # Extract the token parameter from url args = parse_qs(urlparse(path)[4]) # 4 is the query from url - if not len(args['token']): + if not args.has_key('token') or not len(args['token']): raise self.EClose("Token not present") token = args['token'][0].rstrip('\n')