Skip to content

Fix password strength validation library (was forcibly disabled) - #90

Draft
koo5 with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-password-strength-validation-library
Draft

Fix password strength validation library (was forcibly disabled)#90
koo5 with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-password-strength-validation-library

Conversation

Copilot AI commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The password-strength library was installed and in the dependency spec, but never actually used: the import was placed outside the try/except block, and _PASSWORD_STRENGTH_AVAILABLE was unconditionally overridden to False afterward.

Changes

  • backend/common/password_utils.py: Move from password_strength import PasswordPolicy inside the try/except block and remove the hardcoded _PASSWORD_STRENGTH_AVAILABLE = False override
# Before (broken)
from password_strength import PasswordPolicy  # top-level, crashes if missing

try:
    _PASSWORD_STRENGTH_AVAILABLE = True  # try block imports nothing
except ImportError:
    _PASSWORD_STRENGTH_AVAILABLE = False
_PASSWORD_STRENGTH_AVAILABLE = False  # unconditionally disabled

# After (fixed)
try:
    from password_strength import PasswordPolicy
    _PASSWORD_STRENGTH_AVAILABLE = True
except ImportError:
    _PASSWORD_STRENGTH_AVAILABLE = False

When the library is unavailable, falls back to the existing basic regex validation.

Copilot AI changed the title [WIP] Fix password strength validation library import issues Fix password strength validation library (was forcibly disabled) Jun 25, 2026
Copilot AI requested a review from koo5 June 25, 2026 20:41
Copilot finished work on behalf of koo5 June 25, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants