Обновить darkbazaar/src/auth.py
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
from passlib.context import CryptContext
|
from passlib.context import CryptContext
|
||||||
|
|
||||||
ctx = CryptContext(schemes=["pbkdf2_sha256"], pbkdf2_sha256__rounds=1)
|
# SECURITY FIX: Use proper PBKDF2 rounds (29000+ recommended, using 260000 for better security)
|
||||||
|
# Previously was using only 1 round which made password cracking trivial
|
||||||
|
ctx = CryptContext(schemes=["pbkdf2_sha256"], pbkdf2_sha256__rounds=260000)
|
||||||
|
|
||||||
def get_password_hash(password: str) -> str:
|
def get_password_hash(password: str) -> str:
|
||||||
return ctx.hash(password)
|
return ctx.hash(password)
|
||||||
|
|||||||
Reference in New Issue
Block a user