git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a pass on some explicit encode calls that are obviously wrong in python3; some may...
[plcapi.git]
/
PLC
/
Methods
/
VerifyPerson.py
diff --git
a/PLC/Methods/VerifyPerson.py
b/PLC/Methods/VerifyPerson.py
index
ef4e988
..
10ad1c2
100644
(file)
--- 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
site_name = "No Site"
# Generate 32 random bytes
-
byte
s = random.sample(range(0, 256), 32)
+
int8
s = random.sample(range(0, 256), 32)
# Base64 encode their string representation
# 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 \
if verification_key is None or \
(verification_key is not None and person['verification_expires'] and \