feat: Enhance CSRF protection and support for CSV file uploads across multiple templates

This commit is contained in:
2026-04-17 18:33:55 +02:00
parent 2f65fba3ae
commit a27639a976
6 changed files with 298 additions and 52 deletions
+12 -1
View File
@@ -79,7 +79,18 @@ def check_password_strength(password):
Returns:
bool: True if password is strong enough, False otherwise
"""
if len(password) < 6:
if password is None:
return False
if len(password) < 12:
return False
has_lower = any(char.islower() for char in password)
has_upper = any(char.isupper() for char in password)
has_digit = any(char.isdigit() for char in password)
has_symbol = any(not char.isalnum() for char in password)
if not (has_lower and has_upper and has_digit and has_symbol):
return False
return True