hashers: convert salt to bytes before concatenation (#33226)

This commit is contained in:
Benjamin Dauvergne 2019-05-17 20:57:50 +02:00
parent 9fbbf0519a
commit 92c829dd3a
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ class Drupal7PasswordHasher(hashers.BasePasswordHasher):
def encode(self, password, salt, iterations):
assert password
assert salt and '$' not in salt
h = salt
h = force_bytes(salt)
password = force_bytes(password)
for i in range(iterations + 1):
h = self.digest(h + password).digest()