Removes the master password and remove all saved passwords This password will be used to encrypt/decrypt saved server passwords
()
| 659 | @blueprint.route("/master_password", endpoint="reset_master_password", |
| 660 | methods=["DELETE"]) |
| 661 | def 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", |
nothing calls this directly
no test coverage detected