Skip to content

Commit dec4d28

Browse files
committed
fix string comparison
1 parent 757b0f1 commit dec4d28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oauth2client/xsrfutil.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def validate_token(key, token, user_id, action_id="", current_time=None):
110110

111111
# Perform constant time comparison to avoid timing attacks
112112
different = 0
113-
for x, y in zip(token, expected_token.decode('utf-8')):
113+
for x, y in zip(token.decode("utf-8"), expected_token.decode("utf-8")):
114114
different |= ord(x) ^ ord(y)
115115
if different:
116116
return False

0 commit comments

Comments
 (0)