Clean up comments
This commit is contained in:
@ -34,7 +34,7 @@ pub fn validate_new_passwords(new_password1: &str, new_password2: &str) -> Resul
|
||||
}
|
||||
}
|
||||
|
||||
/// Uses htpasswd to set a new password for the admin user
|
||||
/// Sets a new password for the admin user
|
||||
pub fn set_new_password(new_password: &str) -> Result<(), PeachError> {
|
||||
let new_password_hash = hash_password(&new_password.to_string());
|
||||
let result = set_admin_password_hash(&new_password_hash);
|
||||
@ -55,7 +55,7 @@ pub fn hash_password(password: &str) -> String {
|
||||
hasher.result_str()
|
||||
}
|
||||
|
||||
/// Uses htpasswd to set a new temporary password for the admin user
|
||||
/// Sets a new temporary password for the admin user
|
||||
/// which can be used to reset the permanent password
|
||||
pub fn set_new_temporary_password(new_password: &str) -> Result<(), PeachError> {
|
||||
let new_password_hash = hash_password(&new_password.to_string());
|
||||
@ -82,7 +82,7 @@ pub fn verify_temporary_password(password: &str) -> Result<(), PeachError> {
|
||||
}
|
||||
}
|
||||
|
||||
/// generates a temporary password and sends it via ssb dm
|
||||
/// Generates a temporary password and sends it via ssb dm
|
||||
/// to the ssb id configured to be the admin of the peachcloud device
|
||||
pub fn send_password_reset() -> Result<(), PeachError> {
|
||||
// first generate a new random password of ascii characters
|
||||
@ -119,7 +119,6 @@ using this link: http://peach.local/reset_password",
|
||||
msg += &remote_link;
|
||||
// finally send the message to the admins
|
||||
let peach_config = load_peach_config()?;
|
||||
info!("sending password reset: {}", msg);
|
||||
for ssb_admin_id in peach_config.ssb_admin_ids {
|
||||
sbot_client::private_message(&msg, &ssb_admin_id)?;
|
||||
}
|
||||
|
Reference in New Issue
Block a user