MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / normalise_password

Function normalise_password

web/pgadmin/tools/user_management/__init__.py:543–556  ·  view source on GitHub ↗

Normalise the password. Flask security normalized the password prior to changing or comparing using Python unicodedata.normalize(). As we are not using flask security form to add/update user, we need custom function to do the same.

(password)

Source from the content-addressed store, hash-verified

541
542
543def normalise_password(password):
544 """
545 Normalise the password.
546 Flask security normalized the password prior to changing or comparing using
547 Python unicodedata.normalize(). As we are not using flask security form
548 to add/update user, we need custom function to do the same.
549 """
550 normalise_form = current_app.config.get(
551 'SECURITY_PASSWORD_NORMALIZE_FORM',
552 'NFKD'
553 )
554
555 return password if is_normalized(normalise_form, password) else\
556 normalize(normalise_form, password)
557
558
559def validate_unique_role(data):

Callers 1

validate_passwordFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected