Обновить darkbazaar/src/auth.py

This commit is contained in:
pwn
2025-12-14 14:47:00 +03:00
parent 0f7e716f20
commit d45ca06d07

View File

@@ -1,6 +1,8 @@
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:
return ctx.hash(password)