We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ef91351 + 779d17d commit 5298017Copy full SHA for 5298017
pymysql/connections.py
@@ -132,14 +132,16 @@ def is_ascii(data):
132
print()
133
134
135
+SCRAMBLE_LENGTH = 20
136
+
137
def _scramble(password, message):
138
if not password:
139
return b''
140
if DEBUG: print('password=' + str(password))
141
stage1 = sha_new(password).digest()
142
stage2 = sha_new(stage1).digest()
143
s = sha_new()
- s.update(message)
144
+ s.update(message[:SCRAMBLE_LENGTH])
145
s.update(stage2)
146
result = s.digest()
147
return _my_crypt(result, stage1)
0 commit comments