MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / reset_master_password

Function reset_master_password

web/pgadmin/browser/__init__.py:661–675  ·  view source on GitHub ↗

Removes the master password and remove all saved passwords This password will be used to encrypt/decrypt saved server passwords

()

Source from the content-addressed store, hash-verified

659@blueprint.route("/master_password", endpoint="reset_master_password",
660 methods=["DELETE"])
661def reset_master_password():
662 """
663 Removes the master password and remove all saved passwords
664 This password will be used to encrypt/decrypt saved server passwords
665 """
666 cleanup_master_password()
667 status, crypt_key = get_crypt_key()
668 if not status and config.MASTER_PASSWORD_HOOK:
669 crypt_key = get_master_password_from_master_hook()
670
671 # Set masterpass_check if MASTER_PASSWORD_HOOK is set which provides
672 # encryption key
673 if config.SERVER_MODE and config.MASTER_PASSWORD_HOOK:
674 set_masterpass_check_text(crypt_key)
675 return make_json_response(data=status)
676
677
678@blueprint.route("/master_password", endpoint="set_master_password",

Callers

nothing calls this directly

Calls 5

cleanup_master_passwordFunction · 0.90
get_crypt_keyFunction · 0.90
make_json_responseFunction · 0.90

Tested by

no test coverage detected