X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FVerifyPerson.py;fp=PLC%2FMethods%2FVerifyPerson.py;h=10ad1c227c623af4f1039e370e929a339989979b;hb=aed64f31afdf04bdd6e22f3b1efdd61a2d63174a;hp=ef4e988b2fd297c224f96fef5140f0eb0fbd92f8;hpb=b92fd6505ef9a6e2e3532add89f0eb368bd4e2e2;p=plcapi.git diff --git a/PLC/Methods/VerifyPerson.py b/PLC/Methods/VerifyPerson.py index ef4e988..10ad1c2 100644 --- a/PLC/Methods/VerifyPerson.py +++ b/PLC/Methods/VerifyPerson.py @@ -63,9 +63,9 @@ class VerifyPerson(Method): site_name = "No Site" # Generate 32 random bytes - bytes = random.sample(range(0, 256), 32) + int8s = random.sample(range(0, 256), 32) # Base64 encode their string representation - random_key = base64.b64encode("".join(map(chr, bytes))) + random_key = base64.b64encode(bytes(int8s)) if verification_key is None or \ (verification_key is not None and person['verification_expires'] and \