From f97e02e867cba2505304bdf0f847799631db2755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Wed, 10 Dec 2014 12:08:13 +0100 Subject: [PATCH] Changed "key" generation on actor to use a random 48 chars strings instead of an uuid --- actors/src/udsactor/httpserver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/actors/src/udsactor/httpserver.py b/actors/src/udsactor/httpserver.py index 16ee7f3f..ea67d697 100644 --- a/actors/src/udsactor/httpserver.py +++ b/actors/src/udsactor/httpserver.py @@ -37,7 +37,8 @@ from udsactor.certs import createSelfSignedCert from udsactor.scriptThread import ScriptExecutorThread import threading -import uuid +import string +import random import json import six from six.moves import socketserver # @UnresolvedImport, pylint: disable=import-error @@ -178,7 +179,7 @@ class HTTPServerThread(threading.Thread): super(self.__class__, self).__init__() if HTTPServerHandler.uuid is None: - HTTPServerHandler.uuid = uuid.uuid4().get_hex() + HTTPServerHandler.uuid = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(48)) HTTPServerHandler.service = service