mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Encode uuid before hashing in UniversalAnalytics
This commit is contained in:
parent
16742d4705
commit
dcbeca5f7f
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ def generate_uuid(basedata=None):
|
|||
if basedata is None:
|
||||
return str(uuid.uuid4())
|
||||
elif isinstance(basedata, str):
|
||||
checksum = hashlib.md5(basedata).hexdigest()
|
||||
checksum = hashlib.md5(str(basedata).encode('UTF-8')).hexdigest()
|
||||
return '%8s-%4s-%4s-%4s-%12s' % (
|
||||
checksum[0:8], checksum[8:12], checksum[12:16], checksum[16:20], checksum[20:32])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue